summaryrefslogtreecommitdiffstats
path: root/extensions/common/permissions
diff options
context:
space:
mode:
authorrdevlin.cronin <rdevlin.cronin@chromium.org>2015-09-16 10:03:48 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-16 17:04:24 +0000
commit77cb0effc7d4c844f07bb380827a7b1a2cfd2c3c (patch)
tree9d076e393fcf61ed87c4e71ae1db727f611db8f1 /extensions/common/permissions
parent4905daeee8695fb0caf31f34497a1c2f1dac29c4 (diff)
downloadchromium_src-77cb0effc7d4c844f07bb380827a7b1a2cfd2c3c.zip
chromium_src-77cb0effc7d4c844f07bb380827a7b1a2cfd2c3c.tar.gz
chromium_src-77cb0effc7d4c844f07bb380827a7b1a2cfd2c3c.tar.bz2
[Extensions] Allow revokable permissions
Add back-end support for revokable extension permissions for optional permissions, or, if the click-to-script feature is enabled, granted host permissions. BUG=532507 TBR=atwilson@chromium.org (micro change in c/b/background/) Review URL: https://codereview.chromium.org/1327523005 Cr-Commit-Position: refs/heads/master@{#349148}
Diffstat (limited to 'extensions/common/permissions')
-rw-r--r--extensions/common/permissions/permission_set.cc13
1 files changed, 4 insertions, 9 deletions
diff --git a/extensions/common/permissions/permission_set.cc b/extensions/common/permissions/permission_set.cc
index f987411..194f37f8 100644
--- a/extensions/common/permissions/permission_set.cc
+++ b/extensions/common/permissions/permission_set.cc
@@ -89,15 +89,10 @@ PermissionSet* PermissionSet::CreateIntersection(
set2_safe->manifest_permissions(),
&manifest_permissions);
- URLPatternSet explicit_hosts;
- URLPatternSet::CreateIntersection(set1_safe->explicit_hosts(),
- set2_safe->explicit_hosts(),
- &explicit_hosts);
-
- URLPatternSet scriptable_hosts;
- URLPatternSet::CreateIntersection(set1_safe->scriptable_hosts(),
- set2_safe->scriptable_hosts(),
- &scriptable_hosts);
+ URLPatternSet explicit_hosts = URLPatternSet::CreateSemanticIntersection(
+ set1_safe->explicit_hosts(), set2_safe->explicit_hosts());
+ URLPatternSet scriptable_hosts = URLPatternSet::CreateSemanticIntersection(
+ set1_safe->scriptable_hosts(), set2_safe->scriptable_hosts());
return new PermissionSet(apis, manifest_permissions,
explicit_hosts, scriptable_hosts);