diff options
author | yoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-03 19:13:26 +0000 |
---|---|---|
committer | yoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-03 19:13:26 +0000 |
commit | 9a83ea0929d9d68ce175ce1ac968f6ebcd91152d (patch) | |
tree | 56a91e44f9afca7aa9ff31ede73db256b6fff7c3 /chrome/common/extensions/permissions/permission_set.h | |
parent | e2bc92bfd8863ee4d9293d6711a516dade843742 (diff) | |
download | chromium_src-9a83ea0929d9d68ce175ce1ac968f6ebcd91152d.zip chromium_src-9a83ea0929d9d68ce175ce1ac968f6ebcd91152d.tar.gz chromium_src-9a83ea0929d9d68ce175ce1ac968f6ebcd91152d.tar.bz2 |
Refactor PermissionSet to move chrome-specific host checks to ChromeExtensionsClient.
Combine GetChromeSchemeHosts and GetDistinctHostsForDisplay logic for special permission messages for chrome://favicon into GetSpecialHostPermissionWarnings.
BUG=298586
Review URL: https://codereview.chromium.org/25713006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226812 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/permissions/permission_set.h')
-rw-r--r-- | chrome/common/extensions/permissions/permission_set.h | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/chrome/common/extensions/permissions/permission_set.h b/chrome/common/extensions/permissions/permission_set.h index f385aa6..0083a08 100644 --- a/chrome/common/extensions/permissions/permission_set.h +++ b/chrome/common/extensions/permissions/permission_set.h @@ -55,11 +55,6 @@ class PermissionSet static PermissionSet* CreateUnion( const PermissionSet* set1, const PermissionSet* set2); - // Creates a new permission set that only contains permissions that must be - // in the manifest. Passes ownership of the new set to the caller. - static PermissionSet* ExcludeNotInManifestPermissions( - const PermissionSet* set); - bool operator==(const PermissionSet& rhs) const; // Returns true if every API or host permission available to |set| is also @@ -137,15 +132,15 @@ class PermissionSet private: FRIEND_TEST_ALL_PREFIXES(PermissionsTest, HasLessHostPrivilegesThan); FRIEND_TEST_ALL_PREFIXES(PermissionsTest, GetWarningMessages_AudioVideo); - FRIEND_TEST_ALL_PREFIXES(PermissionsTest, GetDistinctHostsForDisplay); + FRIEND_TEST_ALL_PREFIXES(PermissionsTest, GetDistinctHosts); FRIEND_TEST_ALL_PREFIXES(PermissionsTest, - GetDistinctHostsForDisplay_ComIsBestRcd); + GetDistinctHosts_ComIsBestRcd); FRIEND_TEST_ALL_PREFIXES(PermissionsTest, - GetDistinctHostsForDisplay_NetIs2ndBestRcd); + GetDistinctHosts_NetIs2ndBestRcd); FRIEND_TEST_ALL_PREFIXES(PermissionsTest, - GetDistinctHostsForDisplay_OrgIs3rdBestRcd); + GetDistinctHosts_OrgIs3rdBestRcd); FRIEND_TEST_ALL_PREFIXES(PermissionsTest, - GetDistinctHostsForDisplay_FirstInListIs4thBestRcd); + GetDistinctHosts_FirstInListIs4thBestRcd); friend class base::RefCountedThreadSafe<PermissionSet>; ~PermissionSet(); @@ -179,11 +174,6 @@ class PermissionSet bool HasLessHostPrivilegesThan(const PermissionSet* permissions, Manifest::Type extension_type) const; - // Gets a list of the distinct hosts for displaying to the user. - // NOTE: do not use this for comparing permissions, since this disgards some - // information. - std::set<std::string> GetDistinctHostsForDisplay() const; - // The api list is used when deciding if an extension can access certain // extension APIs and features. APIPermissionSet apis_; |