summaryrefslogtreecommitdiffstats
path: root/src/core/net
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2020-08-27 15:25:07 +0200
committerMichal Klocek <michal.klocek@qt.io>2020-11-20 10:47:34 +0100
commit8f77aa42d2b5b67116a095c41040003265c820c7 (patch)
treee625adf9ae3840fcc340774e63761c001bce45ca /src/core/net
parent50218deafeb52419bb45a451bbecf4819dd3ed39 (diff)
Remove deprecated url interoceptor setter from profile
Change-Id: I15c621da6da97b2ccdd57afdfad0d413302d3c24 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/net')
-rw-r--r--src/core/net/proxying_url_loader_factory_qt.cpp23
1 files changed, 1 insertions, 22 deletions
diff --git a/src/core/net/proxying_url_loader_factory_qt.cpp b/src/core/net/proxying_url_loader_factory_qt.cpp
index d63659d2d..235079c26 100644
--- a/src/core/net/proxying_url_loader_factory_qt.cpp
+++ b/src/core/net/proxying_url_loader_factory_qt.cpp
@@ -144,7 +144,6 @@ public:
private:
void InterceptOnUIThread();
- void InterceptOnIOThread(base::WaitableEvent *event);
void ContinueAfterIntercept();
// This is called when the original URLLoaderClient has a connection error.
@@ -253,34 +252,14 @@ void InterceptedRequest::Restart()
initiator, QByteArray::fromStdString(request_.method));
request_info_ = QWebEngineUrlRequestInfo(infoPrivate);
- // TODO: remove for Qt6
- if (profile_request_interceptor_ && profile_request_interceptor_->property("deprecated").toBool()) {
- // sync call supports depracated call of an interceptor on io thread
- base::WaitableEvent event;
- base::PostTask(FROM_HERE, { content::BrowserThread::IO },
- base::BindOnce(&InterceptedRequest::InterceptOnIOThread, base::Unretained(this), &event));
- event.Wait();
- if (request_info_.changed()) {
- ContinueAfterIntercept();
- return;
- }
- }
InterceptOnUIThread();
ContinueAfterIntercept();
}
-void InterceptedRequest::InterceptOnIOThread(base::WaitableEvent *event)
-{
- DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
- if (profile_request_interceptor_)
- profile_request_interceptor_->interceptRequest(request_info_);
- event->Signal();
-}
-
void InterceptedRequest::InterceptOnUIThread()
{
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
- if (profile_request_interceptor_ && !profile_request_interceptor_->property("deprecated").toBool())
+ if (profile_request_interceptor_)
profile_request_interceptor_->interceptRequest(request_info_);
if (!request_info_.changed() && page_request_interceptor_)