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

Unified Diff: chrome/browser/renderer_host/chrome_render_view_host_observer.cc

Issue 8587052: When allowing an extension file:/// URL access, grant its process access to that scheme. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix indentation Created 9 years, 1 month 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 | « chrome/browser/extensions/extension_apitest.cc ('k') | chrome/common/extensions/api/extension_api.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/chrome_render_view_host_observer.cc
diff --git a/chrome/browser/renderer_host/chrome_render_view_host_observer.cc b/chrome/browser/renderer_host/chrome_render_view_host_observer.cc
index cb924d3b6b035ffe2eaaf658f3879f7af9d0e5d0..eb0646c5bb70d713ede03186f1f1ec9001a499e8 100644
--- a/chrome/browser/renderer_host/chrome_render_view_host_observer.cc
+++ b/chrome/browser/renderer_host/chrome_render_view_host_observer.cc
@@ -116,6 +116,13 @@ void ChromeRenderViewHostObserver::InitRenderViewForExtensions() {
process->id(), chrome::kChromeUIScheme);
}
+ if (type == Extension::TYPE_EXTENSION &&
+ profile_->GetExtensionService()->extension_prefs()->AllowFileAccess(
+ extension->id())) {
+ ChildProcessSecurityPolicy::GetInstance()->GrantScheme(
+ process->id(), chrome::kFileScheme);
+ }
+
if (type == Extension::TYPE_EXTENSION ||
type == Extension::TYPE_USER_SCRIPT ||
type == Extension::TYPE_PACKAGED_APP ||
« no previous file with comments | « chrome/browser/extensions/extension_apitest.cc ('k') | chrome/common/extensions/api/extension_api.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698