summaryrefslogtreecommitdiffstats
path: root/src/core/url_request_context_getter_qt.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-02-04 13:50:57 +0100
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-02-04 14:13:39 +0100
commit6722bbbf4ea2ddcdd9194f26a883029ec3afc39a (patch)
treec3290b82fac21c4990be8472ae6cb4ca043205cf /src/core/url_request_context_getter_qt.cpp
parent41d69eb0fa2375f0da6ba9b35136f5598be4b3a4 (diff)
parent82f4d13a13b40d9cb7710f6dd4190175a272a394 (diff)
Merge branch '5.6' into dev
Diffstat (limited to 'src/core/url_request_context_getter_qt.cpp')
-rw-r--r--src/core/url_request_context_getter_qt.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/core/url_request_context_getter_qt.cpp b/src/core/url_request_context_getter_qt.cpp
index afb3c231e..bcbc5f4ef 100644
--- a/src/core/url_request_context_getter_qt.cpp
+++ b/src/core/url_request_context_getter_qt.cpp
@@ -131,8 +131,9 @@ void URLRequestContextGetterQt::updateStorageSettings()
content::BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
content::BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)
));
- if (m_storage)
+ if (m_storage) {
content::BrowserThread::PostTask(content::BrowserThread::IO, FROM_HERE, base::Bind(&URLRequestContextGetterQt::generateStorage, this));
+ }
}
}
@@ -287,7 +288,7 @@ void URLRequestContextGetterQt::generateUserAgent()
Q_ASSERT(m_urlRequestContext);
Q_ASSERT(m_storage);
- m_storage->set_http_user_agent_settings(scoped_ptr<net::HttpUserAgentSettings>(new HttpUserAgentSettingsQt(m_browserContext)));
+ m_storage->set_http_user_agent_settings(scoped_ptr<net::HttpUserAgentSettings>(new HttpUserAgentSettingsQt(m_browserContext.constData())));
}
void URLRequestContextGetterQt::updateHttpCache()
@@ -298,6 +299,13 @@ void URLRequestContextGetterQt::updateHttpCache()
}
}
+void URLRequestContextGetterQt::updateJobFactory()
+{
+ Q_ASSERT(m_jobFactory);
+
+ content::BrowserThread::PostTask(content::BrowserThread::IO, FROM_HERE, base::Bind(&URLRequestContextGetterQt::generateJobFactory, this));
+}
+
static bool doNetworkSessionParamsMatch(const net::HttpNetworkSession::Params &first, const net::HttpNetworkSession::Params &second)
{
if (first.transport_security_state != second.transport_security_state)
@@ -413,8 +421,8 @@ void URLRequestContextGetterQt::clearCurrentCacheBackend()
void URLRequestContextGetterQt::generateJobFactory()
{
Q_ASSERT(m_urlRequestContext);
- Q_ASSERT(!m_jobFactory);
+ m_jobFactory.reset();
scoped_ptr<net::URLRequestJobFactoryImpl> jobFactory(new net::URLRequestJobFactoryImpl());
{
@@ -422,7 +430,6 @@ void URLRequestContextGetterQt::generateJobFactory()
content::ProtocolHandlerMap::iterator it = m_protocolHandlers.find(url::kBlobScheme);
Q_ASSERT(it != m_protocolHandlers.end());
jobFactory->SetProtocolHandler(it->first, scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>(it->second.release()));
- m_protocolHandlers.clear();
}
jobFactory->SetProtocolHandler(url::kDataScheme, scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>(new net::DataProtocolHandler()));