diff options
author | kalman@chromium.org <kalman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-30 18:28:39 +0000 |
---|---|---|
committer | kalman@chromium.org <kalman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-30 18:28:39 +0000 |
commit | c1abb3237596e83cc12639d5b9e7607b67ae77f2 (patch) | |
tree | 4696ac8ad2d52243324f89fd2f238669785541e2 /extensions/common/extension_api.cc | |
parent | 056fb8baa877888f0996eb5283721f1dbf2b5fb4 (diff) | |
download | chromium_src-c1abb3237596e83cc12639d5b9e7607b67ae77f2.zip chromium_src-c1abb3237596e83cc12639d5b9e7607b67ae77f2.tar.gz chromium_src-c1abb3237596e83cc12639d5b9e7607b67ae77f2.tar.bz2 |
Allow restricting WebUI-enabled extension APIs to URL patterns.
BUG=391944
R=rockot@chromium.org, jschuh@chromium.org
Review URL: https://codereview.chromium.org/422433005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286564 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions/common/extension_api.cc')
-rw-r--r-- | extensions/common/extension_api.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/extensions/common/extension_api.cc b/extensions/common/extension_api.cc index 3f17488..d10084c 100644 --- a/extensions/common/extension_api.cc +++ b/extensions/common/extension_api.cc @@ -303,8 +303,9 @@ bool ExtensionAPI::IsAvailableInUntrustedContext(const std::string& name, .is_available(); } -bool ExtensionAPI::IsAvailableToWebUI(const std::string& name) { - return IsAvailable(name, NULL, Feature::WEBUI_CONTEXT, GURL()).is_available(); +bool ExtensionAPI::IsAvailableToWebUI(const std::string& name, + const GURL& url) { + return IsAvailable(name, NULL, Feature::WEBUI_CONTEXT, url).is_available(); } const base::DictionaryValue* ExtensionAPI::GetSchema( |