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

Unified Diff: chrome/browser/spellchecker/spellcheck_service.cc

Issue 2958223002: Use ContainsValue() instead of std::find() in chrome/browser and chrome/common (Closed)
Patch Set: Rebase patch. 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/spellchecker/spellcheck_service.cc
diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc
index cf86778ba821d57661601d8e86604524fb5cb435..ff8cbf3c4ec72d31e413981c77e896ae09efac15 100644
--- a/chrome/browser/spellchecker/spellcheck_service.cc
+++ b/chrome/browser/spellchecker/spellcheck_service.cc
@@ -7,6 +7,7 @@
#include <set>
#include "base/logging.h"
+#include "base/stl_util.h"
#include "base/strings/string_split.h"
#include "base/supports_user_data.h"
#include "base/synchronization/waitable_event.h"
@@ -346,8 +347,7 @@ void SpellcheckService::OnAcceptLanguagesChanged() {
std::vector<std::string> filtered_dictionaries;
for (const auto& dictionary : dictionaries) {
- if (std::find(accept_languages.begin(), accept_languages.end(),
- dictionary) != accept_languages.end()) {
+ if (base::ContainsValue(accept_languages, dictionary)) {
filtered_dictionaries.push_back(dictionary);
}
}

Powered by Google App Engine
This is Rietveld 408576698