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

Unified Diff: content/child/web_url_loader_impl.cc

Issue 2729103005: Fix bug with data:urls and PlzNavigate on Android. (Closed)
Patch Set: without PlzNavigate Created 3 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
« no previous file with comments | « no previous file | no next file » | 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 eb948a9508c8a2a4347f8e2ed1e218b82fa6dfb1..e57df2a7c4f26b666ed68a5dc28d79d66ce5d94d 100644
--- a/content/child/web_url_loader_impl.cc
+++ b/content/child/web_url_loader_impl.cc
@@ -928,9 +928,12 @@ bool WebURLLoaderImpl::Context::CanHandleDataURLRequestLocally() const {
// For compatibility reasons on Android we need to expose top-level data://
// to the browser. In tests resource_dispatcher_ can be null, and test pages
// need to be loaded locally.
+ // For PlzNavigate, navigation requests were already checked in the browser.
if (resource_dispatcher_ &&
- request_.getFrameType() == WebURLRequest::FrameTypeTopLevel)
- return false;
+ request_.getFrameType() == WebURLRequest::FrameTypeTopLevel) {
+ if (!IsBrowserSideNavigationEnabled())
+ return false;
+ }
#endif
if (request_.getFrameType() != WebURLRequest::FrameTypeTopLevel &&
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698