summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/url_request_context_getter_qt.cpp5
-rw-r--r--src/core/url_request_context_getter_qt.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/core/url_request_context_getter_qt.cpp b/src/core/url_request_context_getter_qt.cpp
index 618354d1c..20efec295 100644
--- a/src/core/url_request_context_getter_qt.cpp
+++ b/src/core/url_request_context_getter_qt.cpp
@@ -127,8 +127,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));
+ }
}
}
@@ -283,7 +284,7 @@ void URLRequestContextGetterQt::generateUserAgent()
Q_ASSERT(m_urlRequestContext);
Q_ASSERT(m_storage);
- m_storage->set_http_user_agent_settings(new HttpUserAgentSettingsQt(m_browserContext));
+ m_storage->set_http_user_agent_settings(new HttpUserAgentSettingsQt(m_browserContext.constData()));
}
void URLRequestContextGetterQt::updateHttpCache()
diff --git a/src/core/url_request_context_getter_qt.h b/src/core/url_request_context_getter_qt.h
index 8740c65a2..555d56784 100644
--- a/src/core/url_request_context_getter_qt.h
+++ b/src/core/url_request_context_getter_qt.h
@@ -94,7 +94,7 @@ private:
bool m_ignoreCertificateErrors;
QAtomicInt m_updateCookieStore;
QAtomicInt m_updateHttpCache;
- BrowserContextAdapter *m_browserContext;
+ QExplicitlySharedDataPointer<BrowserContextAdapter> m_browserContext;
content::ProtocolHandlerMap m_protocolHandlers;
QAtomicPointer<net::ProxyConfigService> m_proxyConfigService;