diff options
author | kalman <kalman@chromium.org> | 2014-12-16 18:19:41 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-17 02:20:18 +0000 |
commit | 100aea413ed702bc7d7814c7fd64e9f922cc3272 (patch) | |
tree | 63934a4a21512676d15e7d71f2b6fc1afd80b98b /extensions/common/extension_api.cc | |
parent | aa856c360183f237bc8df709986439f62f5c1250 (diff) | |
download | chromium_src-100aea413ed702bc7d7814c7fd64e9f922cc3272.zip chromium_src-100aea413ed702bc7d7814c7fd64e9f922cc3272.tar.gz chromium_src-100aea413ed702bc7d7814c7fd64e9f922cc3272.tar.bz2 |
Convert EventRouter to use ProcessMap::GetMostLikelyContextType rather than
implementing its own process checking logic, and (double) check on event
dispatch that the context has permission to receive the event. Currently we
only check on event registration.
BUG=441789
R=rockot@chromium.org
Review URL: https://codereview.chromium.org/802653003
Cr-Commit-Position: refs/heads/master@{#308727}
Diffstat (limited to 'extensions/common/extension_api.cc')
-rw-r--r-- | extensions/common/extension_api.cc | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/extensions/common/extension_api.cc b/extensions/common/extension_api.cc index 8267695..01fb890 100644 --- a/extensions/common/extension_api.cc +++ b/extensions/common/extension_api.cc @@ -296,19 +296,6 @@ Feature::Availability ExtensionAPI::IsAvailable(const std::string& full_name, return feature->IsAvailableToContext(extension, context, url); } -bool ExtensionAPI::IsAvailableInUntrustedContext(const std::string& name, - const Extension* extension) { - return IsAvailable(name, extension, Feature::CONTENT_SCRIPT_CONTEXT, GURL()) - .is_available() || - IsAvailable( - name, extension, Feature::UNBLESSED_EXTENSION_CONTEXT, GURL()) - .is_available() || - IsAvailable(name, extension, Feature::BLESSED_WEB_PAGE_CONTEXT, GURL()) - .is_available() || - IsAvailable(name, extension, Feature::WEB_PAGE_CONTEXT, GURL()) - .is_available(); -} - bool ExtensionAPI::IsAvailableToWebUI(const std::string& name, const GURL& url) { return IsAvailable(name, NULL, Feature::WEBUI_CONTEXT, url).is_available(); |