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

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

Issue 2331343005: PlzNavigate: Get StreamPrivate API to work. (Closed)
Patch Set: Fix DCHECK leading to browser test redness Created 4 years, 3 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 bd2e5b496b8ade249986664364b169912ba29ce9..150a10f7853fdefcedb90708c1fc85e11334751f 100644
--- a/content/browser/loader/navigation_resource_handler.cc
+++ b/content/browser/loader/navigation_resource_handler.cc
@@ -103,7 +103,7 @@ bool NavigationResourceHandler::OnResponseStarted(ResourceResponse* response,
// TODO(davidben): Move the dispatch out of MimeTypeResourceHandler. Perhaps
// all the way to the UI thread. Downloads, user certificates, etc., should be
// dispatched at the navigation layer.
- if (info->IsDownload() || info->is_stream())
+ if (info->IsDownload())
return true;
StreamContext* stream_context =
@@ -132,8 +132,14 @@ bool NavigationResourceHandler::OnResponseStarted(ResourceResponse* response,
core_->NotifyResponseStarted(response, writer_.stream()->CreateHandle(),
ssl_status, std::move(cloned_data));
- *defer = true;
-
+ // Don't defer stream based requests. This includes requests initiated via
+ // mime type sniffing, etc.
+ // TODO(ananta)
+ // Make sure that the requests go through the throttle checks. Currently this
+ // does not work as the InterceptingResourceHandler is above us and hence it
+ // does not expect the old handler to defer the request.
+ if (!info->is_stream())
+ *defer = true;
return true;
}
« no previous file with comments | « chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc ('k') | content/browser/loader/resource_request_info_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698