summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorrdevlin.cronin@chromium.org <rdevlin.cronin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-13 20:00:20 +0000
committerrdevlin.cronin@chromium.org <rdevlin.cronin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-13 20:00:20 +0000
commit10194a4207784bbef148603cd88725212fa520ba (patch)
treeb66c6886b8342a88826adccad8ddb320667488d4 /extensions
parent427fd6d1a4fbecdcf7041c7cc00738424f9c5bae (diff)
downloadchromium_src-10194a4207784bbef148603cd88725212fa520ba.zip
chromium_src-10194a4207784bbef148603cd88725212fa520ba.tar.gz
chromium_src-10194a4207784bbef148603cd88725212fa520ba.tar.bz2
Don't require user action for active scripts for component or policy exts
BUG=372243 BUG=362353 Review URL: https://codereview.chromium.org/288453002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270181 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions')
-rw-r--r--extensions/common/permissions/permissions_data.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/extensions/common/permissions/permissions_data.cc b/extensions/common/permissions/permissions_data.cc
index 809865d..65359d9 100644
--- a/extensions/common/permissions/permissions_data.cc
+++ b/extensions/common/permissions/permissions_data.cc
@@ -564,8 +564,12 @@ bool PermissionsData::CanCaptureVisiblePage(const Extension* extension,
bool PermissionsData::RequiresActionForScriptExecution(
const Extension* extension) {
// For now, the user should be notified when an extension with all hosts
- // permission tries to execute a script on a page.
- return HasEffectiveAccessToAllHosts(extension);
+ // permission tries to execute a script on a page. Exceptions for policy-
+ // enabled and component extensions.
+ return extension->ShouldDisplayInExtensionSettings() &&
+ !Manifest::IsPolicyLocation(extension->location()) &&
+ !Manifest::IsComponentLocation(extension->location()) &&
+ HasEffectiveAccessToAllHosts(extension);
}
bool PermissionsData::ParsePermissions(Extension* extension,