diff options
author | Peter Varga <pvarga@inf.u-szeged.hu> | 2019-03-01 12:42:01 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-03-23 00:24:58 +0000 |
commit | cedb457045c9972ba6da9c101c2ad65006b4db93 (patch) | |
tree | 4877744e17cc9b41163a82f487c76a1eb52929a7 /src/core/profile_io_data_qt.h | |
parent | ce6a1a74d16deecf0c150aa1f5bae2cc6a95e7b1 (diff) |
Fix disabling http cache after 73-based
BrowserDataRemoverImpl::Remove() indirectly calls
TransportSecurityState::DeleteAllDynamicDataSince() which notifies by
a callback about the finished deletion since:
https://chromium-review.googlesource.com/c/chromium/src/+/1335939
During the deletion the ProfileIODataQt::requestStorageGeneration()
should not be called because it deletes net::TransporSecurityPersister
which background_runner is where the finished deletion callback is
scheduled.
Change-Id: I4782d701f706ed7c8e104a78ba84a27183166fa4
Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
Diffstat (limited to 'src/core/profile_io_data_qt.h')
-rw-r--r-- | src/core/profile_io_data_qt.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/core/profile_io_data_qt.h b/src/core/profile_io_data_qt.h index 57ddb6fd3..3d9a5ef19 100644 --- a/src/core/profile_io_data_qt.h +++ b/src/core/profile_io_data_qt.h @@ -41,6 +41,7 @@ #define PROFILE_IO_DATA_QT_H #include "profile_adapter.h" +#include "content/public/browser/browsing_data_remover.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/custom_handlers/protocol_handler_registry.h" #include "extensions/buildflags/buildflags.h" @@ -70,8 +71,21 @@ class ExtensionSystemQt; namespace QtWebEngineCore { class ClientCertificateStoreData; +class ProfileIODataQt; class ProfileQt; + +class BrowsingDataRemoverObserverQt : public content::BrowsingDataRemover::Observer { +public: + BrowsingDataRemoverObserverQt(ProfileIODataQt *profileIOData); + + void OnBrowsingDataRemoverDone() override; + +private: + ProfileIODataQt *m_profileIOData; +}; + + // ProfileIOData contains data that lives on the IOthread // we still use shared memebers and use mutex which breaks // idea for this object, but this is wip. @@ -130,6 +144,8 @@ public: std::unique_ptr<net::ClientCertStore> CreateClientCertStore(); static ProfileIODataQt *FromResourceContext(content::ResourceContext *resource_context); private: + void removeBrowsingDataRemoverObserver(); + ProfileQt *m_profile; std::unique_ptr<net::URLRequestContextStorage> m_storage; std::unique_ptr<net::NetworkDelegate> m_networkDelegate; @@ -170,9 +186,13 @@ private: bool m_ignoreCertificateErrors = false; bool m_useForGlobalCertificateVerification = false; bool m_hasPageInterceptors = false; + BrowsingDataRemoverObserverQt m_removerObserver; base::WeakPtrFactory<ProfileIODataQt> m_weakPtrFactory; // this should be always the last member QString m_dataPath; + bool m_pendingStorageRequestGeneration = false; DISALLOW_COPY_AND_ASSIGN(ProfileIODataQt); + + friend class BrowsingDataRemoverObserverQt; }; } // namespace QtWebEngineCore |