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

Unified Diff: chrome/browser/extensions/extension_service.cc

Issue 2961033002: Use ContainsValue() instead of std::find() in chrome/browser/extensions (Closed)
Patch Set: Reverted code changes in language_settings_private_api.cc:307 Created 3 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/browser/extensions/extension_service.cc
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index b08bba259aa39cecf2f6156bb06a8dbbbc1a48d7..212ff1af1e62e5e31e6c79cc5240132833adffda 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -6,7 +6,6 @@
#include <stddef.h>
-#include <algorithm>
#include <iterator>
#include <memory>
#include <set>
@@ -18,6 +17,7 @@
#include "base/location.h"
#include "base/metrics/histogram_macros.h"
#include "base/single_thread_task_runner.h"
+#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_tokenizer.h"
#include "base/strings/stringprintf.h"
@@ -1031,7 +1031,7 @@ void ExtensionService::DisableUserExtensionsExcept(
extensions::ManifestURL::GetUpdateURL(extension.get())))
continue;
const std::string& id = extension->id();
- if (except_ids.end() == std::find(except_ids.begin(), except_ids.end(), id))
+ if (!base::ContainsValue(except_ids, id))
DisableExtension(id, extensions::Extension::DISABLE_USER_ACTION);
}
}
« no previous file with comments | « chrome/browser/extensions/extension_management_unittest.cc ('k') | chrome/browser/extensions/updater/extension_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698