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

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

Issue 22460011: [CleanUp] Use base::STLSetDifference in place of std::set_difference (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing head file. Created 7 years, 4 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
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_strip.cc ('k') | extensions/common/matcher/url_matcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/permissions/permission_set.cc
diff --git a/chrome/common/extensions/permissions/permission_set.cc b/chrome/common/extensions/permissions/permission_set.cc
index 4fd0bd789946124c2cea5325889d19a1cc8e21c8..ffcc2b2441887873d66d0a618c310526d4f5c7b9 100644
--- a/chrome/common/extensions/permissions/permission_set.cc
+++ b/chrome/common/extensions/permissions/permission_set.cc
@@ -543,11 +543,9 @@ bool PermissionSet::HasLessHostPrivilegesThan(
// considered an elevation, even though it is not (http://crbug.com/65337).
std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false));
std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false));
- std::set<std::string> new_hosts_only;
-
- std::set_difference(new_hosts_set.begin(), new_hosts_set.end(),
- old_hosts_set.begin(), old_hosts_set.end(),
- std::inserter(new_hosts_only, new_hosts_only.begin()));
+ std::set<std::string> new_hosts_only =
+ base::STLSetDifference<std::set<std::string> >(new_hosts_set,
+ old_hosts_set);
return !new_hosts_only.empty();
}
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_strip.cc ('k') | extensions/common/matcher/url_matcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698