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

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 10544175: Add an ability to call WebKit's WebFrame::loadData via NavigationController. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More comments addressed Created 8 years, 5 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/browser/web_contents/navigation_controller_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 32db0a84633ca4d1dcabd28ae1edf2756783db54..cf814051e975b66a5b8ed93016de103b4094db82 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -307,6 +307,13 @@ void RenderViewHostImpl::SyncRendererPrefs() {
void RenderViewHostImpl::Navigate(const ViewMsg_Navigate_Params& params) {
ChildProcessSecurityPolicyImpl::GetInstance()->GrantRequestURL(
GetProcess()->GetID(), params.url);
+ if (params.url.SchemeIs(chrome::kDataScheme) &&
+ params.base_url_for_data_url.SchemeIs(chrome::kFileScheme)) {
+ // If 'data:' is used, and we have a 'file:' base url, grant access to
+ // local files.
+ ChildProcessSecurityPolicyImpl::GetInstance()->GrantRequestURL(
+ GetProcess()->GetID(), params.base_url_for_data_url);
+ }
ViewMsg_Navigate* nav_message = new ViewMsg_Navigate(GetRoutingID(), params);
« no previous file with comments | « no previous file | content/browser/web_contents/navigation_controller_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698