diff options
author | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-03 09:03:41 +0000 |
---|---|---|
committer | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-03 09:03:41 +0000 |
commit | 56585ef925940e248319b9d6098ae64011e4abea (patch) | |
tree | 63c0041c16603f7fbb9fd0d64440a809e9c19327 /chrome/renderer/extensions/extension_renderer_info.h | |
parent | 6abefa7f2d50f1d55c93a0d0b4b5a7cc4ec1507f (diff) | |
download | chromium_src-56585ef925940e248319b9d6098ae64011e4abea.zip chromium_src-56585ef925940e248319b9d6098ae64011e4abea.tar.gz chromium_src-56585ef925940e248319b9d6098ae64011e4abea.tar.bz2 |
Component extensions (and whitelisted extensions) specifying <all_urls> in their Extension match pattern should be allowed to run content scripts everywhere (including chrome://, chrome-extension://, about: and gallery pages.
The intent was to also allow these extensions to specify more granular permissions, such as about:version instead of <all_urls>, but that didn't make the cut this time.
This CL also enables <all_urls> for host permissions for regular extensions, which was disabled before. Note: That still doesn't give them permission to script the gallery and chrome:// pages, etc.
BUG=36275
TEST=New: ExtensionBrowserTest.AllUrlsWhitelistedExtension, ExtensionBrowserTest.AllUrlsRegularExtensions
Review URL: http://codereview.chromium.org/3440027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61323 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/extensions/extension_renderer_info.h')
-rw-r--r-- | chrome/renderer/extensions/extension_renderer_info.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/chrome/renderer/extensions/extension_renderer_info.h b/chrome/renderer/extensions/extension_renderer_info.h index 926f275..b9b74e5 100644 --- a/chrome/renderer/extensions/extension_renderer_info.h +++ b/chrome/renderer/extensions/extension_renderer_info.h @@ -29,6 +29,12 @@ class ExtensionRendererInfo { const ExtensionExtent& web_extent() const { return web_extent_; } const std::string& name() const { return name_; } const GURL& icon_url() const { return icon_url_; } + const bool allowed_to_execute_script_everywhere() const { + return allowed_to_execute_script_everywhere_; + } + const std::vector<URLPattern> host_permissions() const { + return host_permissions_; + } // Replace the list of extensions with those provided in |params|. static void UpdateExtensions(const ViewMsg_ExtensionsUpdated_Params& params); @@ -67,6 +73,14 @@ class ExtensionRendererInfo { Extension::Location location_; GURL icon_url_; + // Some internal extensions, such as accessibility extensions, should be able + // to execute scripts everywhere. + bool allowed_to_execute_script_everywhere_; + + // The list of host permissions, that the extension is allowed to run scripts + // on. + std::vector<URLPattern> host_permissions_; + // static static std::vector<ExtensionRendererInfo>* extensions_; }; |