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

Unified Diff: chrome/common/extensions/extension_permission_set.h

Issue 7347011: Update URLPatternSet to contain a std::set instead of std::vector. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix windows compile errors. Created 9 years, 5 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/extension_permission_set.h
diff --git a/chrome/common/extensions/extension_permission_set.h b/chrome/common/extensions/extension_permission_set.h
index 5cd331a80ab6ec241f215abf334c94f21da21644..0e461689f7bf80028e81abfe8569e7e2d07ebc09 100644
--- a/chrome/common/extensions/extension_permission_set.h
+++ b/chrome/common/extensions/extension_permission_set.h
@@ -51,7 +51,7 @@ class ExtensionPermissionMessage {
// simply a convenience method around the constructor, since the messages
// change depending on what hosts are present.
static ExtensionPermissionMessage CreateFromHostList(
- const std::vector<std::string>& hosts);
+ const std::set<std::string>& hosts);
// Creates the corresponding permission message.
ExtensionPermissionMessage(ID id, const string16& message);
@@ -292,7 +292,7 @@ class ExtensionPermissionSet {
// 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::vector<std::string> GetDistinctHostsForDisplay() const;
+ std::set<std::string> GetDistinctHostsForDisplay() const;
// Gets the localized permission messages that represent this set.
ExtensionPermissionMessages GetPermissionMessages() const;
@@ -348,8 +348,8 @@ class ExtensionPermissionSet {
FRIEND_TEST_ALL_PREFIXES(ExtensionPermissionSetTest,
HasLessHostPrivilegesThan);
- static std::vector<std::string> GetDistinctHosts(
- const URLPatternList& host_patterns, bool include_rcd);
+ static std::set<std::string> GetDistinctHosts(
+ const URLPatternSet& host_patterns, bool include_rcd);
// Initializes the set based on |extension|'s manifest data.
void InitImplicitExtensionPermissions(const Extension* extension);
« no previous file with comments | « chrome/common/extensions/extension_messages.cc ('k') | chrome/common/extensions/extension_permission_set.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698