summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2019-10-10 09:37:03 +0200
committerMichal Klocek <michal.klocek@qt.io>2019-10-10 14:23:00 +0200
commit7c3977b60c59f5e4826f8c0a58ad887672d55fe1 (patch)
tree99a850a1661ff9b226df2570e01092b287cbef5a
parent7d08de5b527cb2112556a126b889dd7d0d888d22 (diff)
FIXUP: Fix page and profile interceptors initialization
Previous commit showed an issue when interceptors are set before URLRequestContextGetterQt is created. The initial initialization was done on updateStorageSettings() which only affected profile interceptor initialization. Add explicit updateRequestInterceptor call to have profile and page interceptors initialized. This fixes also the issue of not set properly 'deprecated' flag. Change-Id: I0dda9eff67a2d779f4c9693920077a5aac2d9122 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r--src/core/profile_io_data_qt.cpp1
-rw-r--r--src/core/profile_qt.cpp1
2 files changed, 1 insertions, 1 deletions
diff --git a/src/core/profile_io_data_qt.cpp b/src/core/profile_io_data_qt.cpp
index 6ed172335..a2613d3fc 100644
--- a/src/core/profile_io_data_qt.cpp
+++ b/src/core/profile_io_data_qt.cpp
@@ -614,7 +614,6 @@ void ProfileIODataQt::setRequestContextData(content::ProtocolHandlerMap *protoco
void ProfileIODataQt::setFullConfiguration()
{
Q_ASSERT(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
- m_requestInterceptor = m_profileAdapter->requestInterceptor();
m_persistentCookiesPolicy = m_profileAdapter->persistentCookiesPolicy();
m_cookiesPath = m_profileAdapter->cookiesPath();
m_channelIdPath = m_profileAdapter->channelIdPath();
diff --git a/src/core/profile_qt.cpp b/src/core/profile_qt.cpp
index 5977a28a8..cd8ee8110 100644
--- a/src/core/profile_qt.cpp
+++ b/src/core/profile_qt.cpp
@@ -272,6 +272,7 @@ net::URLRequestContextGetter *ProfileQt::CreateRequestContext(
m_profileIOData->setRequestContextData(protocol_handlers, std::move(request_interceptors));
m_profileIOData->updateStorageSettings();
+ m_profileIOData->updateRequestInterceptor();
m_urlRequestContextGetter = new URLRequestContextGetterQt(m_profileIOData.get());
return m_urlRequestContextGetter.get();
}