diff options
author | Michal Klocek <michal.klocek@qt.io> | 2018-08-08 09:03:50 +0200 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2018-08-10 08:23:38 +0000 |
commit | 0358558a3a22c0fdb586de95e4c48bced96ff6c5 (patch) | |
tree | 184cbca418c6739decc9d39cd5810da6a81ccea4 /src/core/net/network_delegate_qt.cpp | |
parent | 80f42a0955365d641d7ca6cb5e99d0a8252a543e (diff) |
Unfriend NetworkDeleagte from ProfileIOData
Directly accessing IOProfileData's m_requestInterceptor
from NetworkDelegateQt is not thread safe, unfriend
the class.
This change does not fix the issue of thread safety of
accessing the requestinterceptor from NetworkDelegateQt,
it is just a cleanup for following commit.
Task-number: QTBUG-69844
Change-Id: I488f8968b38ad200178cea2cb0304e1c93aec711
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'src/core/net/network_delegate_qt.cpp')
-rw-r--r-- | src/core/net/network_delegate_qt.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/net/network_delegate_qt.cpp b/src/core/net/network_delegate_qt.cpp index 580f202e5..81c1d9efa 100644 --- a/src/core/net/network_delegate_qt.cpp +++ b/src/core/net/network_delegate_qt.cpp @@ -224,7 +224,7 @@ int NetworkDelegateQt::OnBeforeURLRequest(net::URLRequest *request, const net::C const QUrl qUrl = toQt(request->url()); - QWebEngineUrlRequestInterceptor* interceptor = m_profileIOData->m_requestInterceptor; + QWebEngineUrlRequestInterceptor* interceptor = m_profileIOData->requestInterceptor(); if (interceptor) { QWebEngineUrlRequestInfoPrivate *infoPrivate = new QWebEngineUrlRequestInfoPrivate(toQt(resourceType), toQt(navigationType), @@ -299,13 +299,13 @@ bool NetworkDelegateQt::OnCanEnablePrivacyMode(const GURL &url, const GURL &site bool NetworkDelegateQt::canSetCookies(const GURL &first_party, const GURL &url, const std::string &cookie_line) const { Q_ASSERT(m_profileIOData); - return m_profileIOData->m_cookieDelegate->canSetCookie(toQt(first_party), QByteArray::fromStdString(cookie_line), toQt(url)); + return m_profileIOData->canSetCookie(toQt(first_party), QByteArray::fromStdString(cookie_line), toQt(url)); } bool NetworkDelegateQt::canGetCookies(const GURL &first_party, const GURL &url) const { Q_ASSERT(m_profileIOData); - return m_profileIOData->m_cookieDelegate->canGetCookies(toQt(first_party), toQt(url)); + return m_profileIOData->canGetCookies(toQt(first_party), toQt(url)); } int NetworkDelegateQt::OnBeforeStartTransaction(net::URLRequest *request, const net::CompletionCallback &callback, net::HttpRequestHeaders *headers) |