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

Unified Diff: chrome/browser/extensions/extension_service.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/extensions/blacklist.cc ('k') | chrome/browser/history/url_index_private_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_service.cc
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index ed7d9ce83109ea52d9080cc7296f0580934b2d3b..36d2ec31745b6135051b50fa7dc24f38ecd2b63b 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -3125,16 +3125,12 @@ void ExtensionService::ManageBlacklist(
const std::set<std::string>& new_blacklisted_ids) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- std::set<std::string> no_longer_blacklisted;
- std::set_difference(old_blacklisted_ids.begin(), old_blacklisted_ids.end(),
- new_blacklisted_ids.begin(), new_blacklisted_ids.end(),
- std::inserter(no_longer_blacklisted,
- no_longer_blacklisted.begin()));
- std::set<std::string> not_yet_blacklisted;
- std::set_difference(new_blacklisted_ids.begin(), new_blacklisted_ids.end(),
- old_blacklisted_ids.begin(), old_blacklisted_ids.end(),
- std::inserter(not_yet_blacklisted,
- not_yet_blacklisted.begin()));
+ std::set<std::string> no_longer_blacklisted =
+ base::STLSetDifference<std::set<std::string> >(old_blacklisted_ids,
+ new_blacklisted_ids);
+ std::set<std::string> not_yet_blacklisted =
+ base::STLSetDifference<std::set<std::string> >(new_blacklisted_ids,
+ old_blacklisted_ids);
for (std::set<std::string>::iterator it = no_longer_blacklisted.begin();
it != no_longer_blacklisted.end(); ++it) {
« no previous file with comments | « chrome/browser/extensions/blacklist.cc ('k') | chrome/browser/history/url_index_private_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698