Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(437)

Unified Diff: content/child/web_url_loader_impl.cc

Issue 1910343006: Enable setting deferral state on ResourceDispatcher at request start (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/child/resource_dispatcher.h ('k') | content/child/web_url_loader_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/web_url_loader_impl.cc
diff --git a/content/child/web_url_loader_impl.cc b/content/child/web_url_loader_impl.cc
index 41daeb0975151871e7c97f6044ec1b382bf124c8..2a8a3563cfbae4528cb6cd53d3305aba4b9f84f9 100644
--- a/content/child/web_url_loader_impl.cc
+++ b/content/child/web_url_loader_impl.cc
@@ -555,6 +555,7 @@ void WebURLLoaderImpl::Context::Start(const WebURLRequest& request,
}
if (sync_load_response) {
+ DCHECK(defers_loading_ == NOT_DEFERRING);
resource_dispatcher_->StartSync(
request_info, request_body.get(), sync_load_response);
return;
@@ -563,6 +564,9 @@ void WebURLLoaderImpl::Context::Start(const WebURLRequest& request,
request_id_ = resource_dispatcher_->StartAsync(
request_info, request_body.get(),
base::WrapUnique(new WebURLLoaderImpl::RequestPeerImpl(this)));
+
+ if (defers_loading_ != NOT_DEFERRING)
+ resource_dispatcher_->SetDefersLoading(request_id_, true);
}
void WebURLLoaderImpl::Context::SetWebTaskRunner(
« no previous file with comments | « content/child/resource_dispatcher.h ('k') | content/child/web_url_loader_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698