From 7c3977b60c59f5e4826f8c0a58ad887672d55fe1 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Thu, 10 Oct 2019 09:37:03 +0200 Subject: 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 --- src/core/profile_io_data_qt.cpp | 1 - src/core/profile_qt.cpp | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) 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(); } -- cgit v1.2.3