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

Unified Diff: content/child/web_url_loader_impl.cc

Issue 1064413003: PlzNavigate: make RenderViewtest helper functions work (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 5 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 | « no previous file | content/public/test/render_view_test.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 e2cec70d33531e72ea4eb4d3a7a83f4120a9b233..585d7f979e2b814146ad9626547c4726e9e2a5dd 100644
--- a/content/child/web_url_loader_impl.cc
+++ b/content/child/web_url_loader_impl.cc
@@ -449,13 +449,6 @@ void WebURLLoaderImpl::Context::Start(const WebURLRequest& request,
url = stream_override_->stream_url;
}
- // PlzNavigate: the only navigation requests going through the WebURLLoader
- // are the ones created by CommitNavigation.
- DCHECK(!base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableBrowserSideNavigation) ||
- stream_override_.get() ||
- request.frameType() == WebURLRequest::FrameTypeNone);
-
if (CanHandleDataURLRequestLocally()) {
if (sync_load_response) {
// This is a sync load. Do the work now.
@@ -470,6 +463,15 @@ void WebURLLoaderImpl::Context::Start(const WebURLRequest& request,
return;
}
+ // PlzNavigate: outside of tests, the only navigation requests going through
+ // the WebURLLoader are the ones created by CommitNavigation. Several browser
+ // tests load HTML directly through a data url which will be handled by the
+ // block above.
+ DCHECK_IMPLIES(base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableBrowserSideNavigation),
+ stream_override_.get() ||
+ request.frameType() == WebURLRequest::FrameTypeNone);
+
GURL referrer_url(
request.httpHeaderField(WebString::fromUTF8("Referer")).latin1());
const std::string& method = request.httpMethod().latin1();
« no previous file with comments | « no previous file | content/public/test/render_view_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698