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

Unified Diff: chrome/renderer/extensions/resource_request_policy.cc

Issue 12218064: Non-web-accessible extension URLs should not load in non-extension processes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix for a failing unit test Created 7 years, 10 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 | « chrome/common/extensions/extension.h ('k') | chrome/test/data/chrome_extension_resource.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/resource_request_policy.cc
diff --git a/chrome/renderer/extensions/resource_request_policy.cc b/chrome/renderer/extensions/resource_request_policy.cc
index 194ae25e1fe06b93b1cb824c70cbaee338fc8eeb..9f8e33656ca75586ddb921c40f22aed2a256ddd3 100644
--- a/chrome/renderer/extensions/resource_request_policy.cc
+++ b/chrome/renderer/extensions/resource_request_policy.cc
@@ -23,6 +23,12 @@
namespace extensions {
+// This method does a security check whether chrome-extension:// URLs can be
+// requested by the renderer. Since this is in an untrusted process, the browser
+// has a similar check to enforce the policy, in case this process is exploited.
+// If you are changing this function, ensure equivalent checks are added to
+// extension_protocols.cc AllowExtensionResourceLoad.
+
// static
bool ResourceRequestPolicy::CanRequestResource(
const GURL& resource_url,
« no previous file with comments | « chrome/common/extensions/extension.h ('k') | chrome/test/data/chrome_extension_resource.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698