Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Unified Diff: extensions/common/permissions/permission_set.h

Issue 51433002: Enable permission warnings from ManifestHandlers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing. Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: extensions/common/permissions/permission_set.h
diff --git a/extensions/common/permissions/permission_set.h b/extensions/common/permissions/permission_set.h
index a0e4b34740f35ceb01fdbd204782340328cfea62..b30c40dd3b55f9fd51645f00aa1e53e70e0a8b49 100644
--- a/extensions/common/permissions/permission_set.h
+++ b/extensions/common/permissions/permission_set.h
@@ -32,10 +32,11 @@ class PermissionSet
PermissionSet();
// Creates a new permission set based on the specified data: the API
- // permissions, host permissions, and scriptable hosts. The effective hosts
- // of the newly created permission set will be inferred from the given
- // host permissions.
+ // permissions, manifest key permissions, host permissions, and scriptable
+ // hosts. The effective hosts of the newly created permission set will be
+ // inferred from the given host permissions.
PermissionSet(const APIPermissionSet& apis,
+ const ManifestPermissionSet& manifest_permissions,
const URLPatternSet& explicit_hosts,
const URLPatternSet& scriptable_hosts);
@@ -102,6 +103,10 @@ class PermissionSet
const APIPermissionSet& apis() const { return apis_; }
+ const ManifestPermissionSet& manifest_permissions() const {
+ return manifest_permissions_;
+ }
+
const URLPatternSet& effective_hosts() const { return effective_hosts_; }
const URLPatternSet& explicit_hosts() const { return explicit_hosts_; }
@@ -126,6 +131,10 @@ class PermissionSet
// extension APIs and features.
APIPermissionSet apis_;
+ // The manifest key permission list is used when deciding if an extension
+ // can access certain extension APIs and features.
+ ManifestPermissionSet manifest_permissions_;
+
// The list of hosts that can be accessed directly from the extension.
// TODO(jstritar): Rename to "hosts_"?
URLPatternSet explicit_hosts_;

Powered by Google App Engine
This is Rietveld 408576698