diff options
author | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-24 17:49:08 +0000 |
---|---|---|
committer | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-24 17:49:08 +0000 |
commit | 05c82189519642144323493e1d0cd65c41ce81ce (patch) | |
tree | abb760e7c2d610ab059eec1222fc3d15b6b30db5 /chrome/common/extensions/extension.cc | |
parent | eb40bc39aafb7933251450019e5b4bcb805982f5 (diff) | |
download | chromium_src-05c82189519642144323493e1d0cd65c41ce81ce.zip chromium_src-05c82189519642144323493e1d0cd65c41ce81ce.tar.gz chromium_src-05c82189519642144323493e1d0cd65c41ce81ce.tar.bz2 |
Require user opt-in before allowing content script injection on file URLs.
BUG=47180
Review URL: http://codereview.chromium.org/2809034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50737 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/extension.cc')
-rw-r--r-- | chrome/common/extensions/extension.cc | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc index 1460ac5..47216fc 100644 --- a/chrome/common/extensions/extension.cc +++ b/chrome/common/extensions/extension.cc @@ -1654,27 +1654,6 @@ bool Extension::HasHostPermission(const GURL& url) const { return false; } -bool Extension::CanExecuteScriptOnHost(const GURL& url, - std::string* error) const { - // No extensions are allowed to execute script on the gallery because that - // would allow extensions to manipulate their own install pages. - if (url.host() == GURL(ChromeStoreURL()).host()) { - if (error) - *error = errors::kCannotScriptGallery; - return false; - } - - if (HasHostPermission(url)) - return true; - - if (error) { - *error = ExtensionErrorUtils::FormatErrorMessage(errors::kCannotAccessPage, - url.spec()); - } - - return false; -} - const std::set<std::string> Extension::GetEffectiveHostPermissions() const { std::set<std::string> effective_hosts; |