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

Unified Diff: content/browser/loader/navigation_resource_handler.cc

Issue 1811913003: PlzNavigate: support NavigationThrottle::WillProcessResponse (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase on top of 1832803002 Created 4 years, 9 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
Index: content/browser/loader/navigation_resource_handler.cc
diff --git a/content/browser/loader/navigation_resource_handler.cc b/content/browser/loader/navigation_resource_handler.cc
index 94e046dbf0c74bf8044e6cd93484c3cab38563fa..6e1694be6cdabb8555bb05bcc77362db99c4bdef 100644
--- a/content/browser/loader/navigation_resource_handler.cc
+++ b/content/browser/loader/navigation_resource_handler.cc
@@ -44,6 +44,13 @@ void NavigationResourceHandler::FollowRedirect() {
controller()->Resume();
}
+void NavigationResourceHandler::ProceedWithResponse() {
+ // Detach from the loader; at this point, the request is now owned by the
+ // StreamHandle sent in OnResponseStarted.
+ DetachFromCore();
+ controller()->Resume();
+}
+
void NavigationResourceHandler::SetController(ResourceController* controller) {
writer_.set_controller(controller);
ResourceHandler::SetController(controller);
@@ -84,11 +91,9 @@ bool NavigationResourceHandler::OnResponseStarted(ResourceResponse* response,
writer_.InitializeStream(stream_context->registry(),
request()->url().GetOrigin());
- // Detach from the loader; at this point, the request is now owned by the
- // StreamHandle.
DevToolsNetLogObserver::PopulateResponseInfo(request(), response);
core_->NotifyResponseStarted(response, writer_.stream()->CreateHandle());
- DetachFromCore();
+ *defer = true;
return true;
}
« no previous file with comments | « content/browser/loader/navigation_resource_handler.h ('k') | content/browser/loader/navigation_url_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698