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

Unified Diff: chrome/browser/extensions/extension_protocols.cc

Issue 3064050: Allow exntesion resources to be loaded into DevTools front-end frame (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 10 years, 4 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: chrome/browser/extensions/extension_protocols.cc
===================================================================
--- chrome/browser/extensions/extension_protocols.cc (revision 55538)
+++ chrome/browser/extensions/extension_protocols.cc (working copy)
@@ -79,9 +79,12 @@
// Don't allow extension resources to be loaded from origins which are not
// present in the extension's effective host permissions with the exception
- // of empty origins and extension schemes.
+ // of empty origins, extension schemes and DevTools front-end.
+ GURL origin_url = GURL(info->frame_origin());
if (!info->frame_origin().empty() &&
- !GURL(info->frame_origin()).SchemeIs(chrome::kExtensionScheme)) {
+ !origin_url.SchemeIs(chrome::kExtensionScheme) &&
+ !(origin_url.SchemeIs(chrome::kChromeUIScheme) &&
+ origin_url.host() == chrome::kChromeUIDevToolsHost)) {
ExtensionExtent host_permissions =
context->GetEffectiveHostPermissionsForExtension(request->url().host());
if (!host_permissions.ContainsURL(GURL(info->frame_origin())))
« 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