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

Unified Diff: chrome/browser/extensions/updater/extension_updater.cc

Issue 2961033002: Use ContainsValue() instead of std::find() in chrome/browser/extensions (Closed)
Patch Set: Created 3 years, 6 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/browser/extensions/updater/extension_updater.cc
diff --git a/chrome/browser/extensions/updater/extension_updater.cc b/chrome/browser/extensions/updater/extension_updater.cc
index 4c666766412938f41e65d91a0d7b3352700106cb..fd9614baf58dfe17c98d23534d3362c8a06f4b1b 100644
--- a/chrome/browser/extensions/updater/extension_updater.cc
+++ b/chrome/browser/extensions/updater/extension_updater.cc
@@ -6,7 +6,6 @@
#include <stdint.h>
-#include <algorithm>
#include <set>
#include <vector>
@@ -319,9 +318,7 @@ void ExtensionUpdater::AddToDownloader(
// An extension might be overwritten by policy, and have its update url
// changed. Make sure existing extensions aren't fetched again, if a
// pending fetch for an extension with the same id already exists.
- std::list<std::string>::const_iterator pending_id_iter = std::find(
- pending_ids.begin(), pending_ids.end(), extension.id());
- if (pending_id_iter == pending_ids.end()) {
+ if (!base::ContainsValue(pending_ids, extension.id())) {
if (downloader_->AddExtension(extension, request_id, fetch_priority))
Devlin 2017/06/30 01:52:00 nit: not this patch, but maybe combine this with t
Tripta 2017/07/03 05:34:44 Done.
request.in_progress_ids_.push_back(extension.id());
}

Powered by Google App Engine
This is Rietveld 408576698