diff options
author | Michal Klocek <michal.klocek@qt.io> | 2018-12-14 15:39:55 +0100 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2019-01-07 13:19:44 +0000 |
commit | 5c85e0748b6c321d9988d126903fed85f311f5e7 (patch) | |
tree | 1343854495303387422352bc4a8da02bb453c84d /src | |
parent | 907303d85385a9bc7dc4cf8eae771dbe5979ff0d (diff) |
Rename leftovers of BrowserContext to ProfileAdapter
Change-Id: Ia86459503be86eb9b0d97affe94b7ce82d5e29f1
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/browser_main_parts_qt.cpp | 4 | ||||
-rw-r--r-- | src/core/profile_adapter.cpp | 4 | ||||
-rw-r--r-- | src/core/web_engine_context.cpp | 6 | ||||
-rw-r--r-- | src/core/web_engine_context.h | 6 |
4 files changed, 10 insertions, 10 deletions
diff --git a/src/core/browser_main_parts_qt.cpp b/src/core/browser_main_parts_qt.cpp index dbd123586..8f39386d4 100644 --- a/src/core/browser_main_parts_qt.cpp +++ b/src/core/browser_main_parts_qt.cpp @@ -204,9 +204,9 @@ void BrowserMainPartsQt::PreMainMessageLoopStart() void BrowserMainPartsQt::PostMainMessageLoopRun() { - // The BrowserContext's destructor uses the MessageLoop so it should be deleted + // The ProfileQt's destructor uses the MessageLoop so it should be deleted // right before the RenderProcessHostImpl's destructor destroys it. - WebEngineContext::current()->destroyBrowserContext(); + WebEngineContext::current()->destroyProfileAdapter(); } int BrowserMainPartsQt::PreCreateThreads() diff --git a/src/core/profile_adapter.cpp b/src/core/profile_adapter.cpp index 86b16fd2c..800fcb401 100644 --- a/src/core/profile_adapter.cpp +++ b/src/core/profile_adapter.cpp @@ -82,7 +82,7 @@ ProfileAdapter::ProfileAdapter(const QString &storageName): , m_visitedLinksPolicy(TrackVisitedLinksOnDisk) , m_httpCacheMaxSize(0) { - WebEngineContext::current()->addBrowserContext(this); + WebEngineContext::current()->addProfileAdapter(this); // creation of profile requires webengine context m_profile.reset(new ProfileQt(this)); content::BrowserContext::Initialize(m_profile.data(), toFilePath(dataPath())); @@ -92,7 +92,7 @@ ProfileAdapter::ProfileAdapter(const QString &storageName): ProfileAdapter::~ProfileAdapter() { - WebEngineContext::current()->removeBrowserContext(this); + WebEngineContext::current()->removeProfileAdapter(this); if (m_downloadManagerDelegate) { m_profile->GetDownloadManager(m_profile.data())->Shutdown(); m_downloadManagerDelegate.reset(); diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index 1361ebbed..aee5be42f 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -183,13 +183,13 @@ bool usingSoftwareDynamicGL() scoped_refptr<QtWebEngineCore::WebEngineContext> WebEngineContext::m_handle; bool WebEngineContext::m_destroyed = false; -void WebEngineContext::destroyBrowserContext() +void WebEngineContext::destroyProfileAdapter() { if (m_defaultProfileAdapter) qWarning("PostMainMessageLoopRun is done, but global profile still exists !"); } -void WebEngineContext::addBrowserContext(ProfileAdapter *profileAdapter) +void WebEngineContext::addProfileAdapter(ProfileAdapter *profileAdapter) { Q_ASSERT(!m_profileAdapters.contains(profileAdapter)); const QString path = profileAdapter->dataPath(); @@ -205,7 +205,7 @@ void WebEngineContext::addBrowserContext(ProfileAdapter *profileAdapter) m_profileAdapters.append(profileAdapter); } -void WebEngineContext::removeBrowserContext(ProfileAdapter *profileAdapter) +void WebEngineContext::removeProfileAdapter(ProfileAdapter *profileAdapter) { m_profileAdapters.removeAll(profileAdapter); } diff --git a/src/core/web_engine_context.h b/src/core/web_engine_context.h index ce71984d4..604c85a61 100644 --- a/src/core/web_engine_context.h +++ b/src/core/web_engine_context.h @@ -82,9 +82,9 @@ public: #if QT_CONFIG(webengine_printing_and_pdf) printing::PrintJobManager* getPrintJobManager(); #endif - void destroyBrowserContext(); - void addBrowserContext(ProfileAdapter *profileAdapter); - void removeBrowserContext(ProfileAdapter *profileAdapter); + void destroyProfileAdapter(); + void addProfileAdapter(ProfileAdapter *profileAdapter); + void removeProfileAdapter(ProfileAdapter *profileAdapter); void destroy(); private: |