| Index: chrome/common/extensions/extension.cc
|
| ===================================================================
|
| --- chrome/common/extensions/extension.cc (revision 86314)
|
| +++ chrome/common/extensions/extension.cc (working copy)
|
| @@ -2709,6 +2709,13 @@
|
| bool Extension::HasHostPermission(const GURL& url) const {
|
| for (URLPatternList::const_iterator host = host_permissions().begin();
|
| host != host_permissions().end(); ++host) {
|
| + // Non-component extensions can only access chrome://favicon and no other
|
| + // chrome:// scheme urls.
|
| + if (url.SchemeIs(chrome::kChromeUIScheme) &&
|
| + url.host() != chrome::kChromeUIFaviconHost &&
|
| + location() != Extension::COMPONENT)
|
| + return false;
|
| +
|
| if (host->MatchesUrl(url))
|
| return true;
|
| }
|
| @@ -2785,6 +2792,10 @@
|
| return false;
|
| }
|
|
|
| + if (page_url.SchemeIs(chrome::kChromeUIScheme) &&
|
| + !CanExecuteScriptEverywhere())
|
| + return false;
|
| +
|
| // If a script is specified, use its matches.
|
| if (script)
|
| return script->MatchesUrl(page_url);
|
|
|