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

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

Issue 12209094: Support requesting subsets of host permissions using the permissions API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 10 months 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: chrome/common/extensions/permissions/permission_set.h
diff --git a/chrome/common/extensions/permissions/permission_set.h b/chrome/common/extensions/permissions/permission_set.h
index a2e3d10b24d15c0479b73f1addd079b4b0ea3afa..11e6bae60ec46e636494dfbbd631820bf009b919 100644
--- a/chrome/common/extensions/permissions/permission_set.h
+++ b/chrome/common/extensions/permissions/permission_set.h
@@ -70,6 +70,12 @@ class PermissionSet
// Returns true if |set| is a subset of this.
bool Contains(const PermissionSet& set) const;
+ // Returns true if the API permissions in |set| are a subset of this, and the
+ // host permissions in this encompass those in |set|.
+ //
+ // See URLPatternSet::Encompasses for more info.
+ bool ContainsOrEncompasses(const PermissionSet& set) const;
+
// Gets the API permissions in this set as a set of strings.
std::set<std::string> GetAPIsAsStrings() const;

Powered by Google App Engine
This is Rietveld 408576698