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

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

Issue 2331343005: PlzNavigate: Get StreamPrivate API to work. (Closed)
Patch Set: 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..cc6ba9f56fe40bbea9c7301ff66fc4984a881dea 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,10 @@ 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.
+ if (!info->is_stream())
ananta 2016/09/14 02:14:16 Deferring this causes a DCHECK to fire in Intercep
+ *defer = true;
return true;
}

Powered by Google App Engine
This is Rietveld 408576698