Index: extensions/common/permissions/permission_set.h |
diff --git a/extensions/common/permissions/permission_set.h b/extensions/common/permissions/permission_set.h |
index a6c62be491c94cabb5026b282dde4ec3ebf9fa16..b0156d5ad13089c044a97d27458157d48412874c 100644 |
--- a/extensions/common/permissions/permission_set.h |
+++ b/extensions/common/permissions/permission_set.h |
@@ -25,8 +25,7 @@ namespace extensions { |
// PermissionMessageProvider::GetCoalescedPermissionMessages() is the only |
// method used for generating permission messages, find the other users of this |
// class and deprecate or rename it as appropriate. |
-class PermissionSet |
- : public base::RefCountedThreadSafe<PermissionSet> { |
+class PermissionSet { |
public: |
// Creates an empty permission set (e.g. default permissions). |
PermissionSet(); |
@@ -39,26 +38,29 @@ class PermissionSet |
const ManifestPermissionSet& manifest_permissions, |
const URLPatternSet& explicit_hosts, |
const URLPatternSet& scriptable_hosts); |
+ ~PermissionSet(); |
// Creates a new permission set equal to |set1| - |set2|. |
- static scoped_refptr<const PermissionSet> CreateDifference( |
+ static scoped_ptr<const PermissionSet> CreateDifference( |
const PermissionSet& set1, |
const PermissionSet& set2); |
// Creates a new permission set equal to the intersection of |set1| and |
// |set2|. |
- static scoped_refptr<const PermissionSet> CreateIntersection( |
+ static scoped_ptr<const PermissionSet> CreateIntersection( |
const PermissionSet& set1, |
const PermissionSet& set2); |
// Creates a new permission set equal to the union of |set1| and |set2|. |
- static scoped_refptr<const PermissionSet> CreateUnion( |
- const PermissionSet& set1, |
- const PermissionSet& set2); |
+ static scoped_ptr<const PermissionSet> CreateUnion(const PermissionSet& set1, |
+ const PermissionSet& set2); |
bool operator==(const PermissionSet& rhs) const; |
bool operator!=(const PermissionSet& rhs) const; |
+ // Returns a copy of this PermissionSet. |
+ scoped_ptr<const PermissionSet> Clone() const; |
not at google - send to devlin
2015/09/22 21:51:26
It's a bit odd to have a Clone() method but no DIS
Devlin
2015/09/23 17:08:59
Done.
|
+ |
// Returns true if every API or host permission available to |set| is also |
// available to this. In other words, if the API permissions of |set| are a |
// subset of this, and the host permissions in this encompass those in |set|. |
@@ -123,9 +125,6 @@ class PermissionSet |
private: |
FRIEND_TEST_ALL_PREFIXES(PermissionsTest, GetWarningMessages_AudioVideo); |
FRIEND_TEST_ALL_PREFIXES(PermissionsTest, AccessToDevicesMessages); |
- friend class base::RefCountedThreadSafe<PermissionSet>; |
- |
- ~PermissionSet(); |
// Adds permissions implied independently of other context. |
void InitImplicitPermissions(); |