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

Unified Diff: webkit/glue/weburlloader_impl.cc

Issue 10440068: [Android] Send top-level data:// requests to the browser. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 7 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: webkit/glue/weburlloader_impl.cc
diff --git a/webkit/glue/weburlloader_impl.cc b/webkit/glue/weburlloader_impl.cc
index c6bcab8732da198796f6acf6f7de4c9bee2e20aa..5acf64a8f36a2cb486b29670ea40af86829b223e 100644
--- a/webkit/glue/weburlloader_impl.cc
+++ b/webkit/glue/weburlloader_impl.cc
@@ -689,6 +689,13 @@ bool WebURLLoaderImpl::Context::CanHandleDataURL(const GURL& url) const {
// reasons as well as to support unit tests, which do not have an underlying
// ResourceLoaderBridge implementation.
+#if defined(OS_ANDROID)
+ // For compatibility reasons on Android we need to expose top-level data://
+ // to the browser.
+ if (request_.targetType() == WebURLRequest::TargetIsMainFrame)
+ return false;
+#endif
+
if (request_.targetType() != WebURLRequest::TargetIsMainFrame &&
request_.targetType() != WebURLRequest::TargetIsSubframe)
return true;
« 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