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

Unified Diff: chrome/renderer/spellchecker/spellcheck.cc

Issue 1715683002: chrome: Use base's ContainsValue helper function instead of std::find (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated as per latest code Created 4 years, 8 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/renderer/spellchecker/spellcheck.cc
diff --git a/chrome/renderer/spellchecker/spellcheck.cc b/chrome/renderer/spellchecker/spellcheck.cc
index cb8040e63369c9f070b0a0f171dd30621f8e93ec..f181cf2db308d6d4b0b449db6552e1d1ed1f4247 100644
--- a/chrome/renderer/spellchecker/spellcheck.cc
+++ b/chrome/renderer/spellchecker/spellcheck.cc
@@ -15,6 +15,7 @@
#include "base/logging.h"
#include "base/macros.h"
#include "base/single_thread_task_runner.h"
+#include "base/stl_util.h"
#include "base/thread_task_runner_handle.h"
#include "build/build_config.h"
#include "chrome/common/channel_info.h"
@@ -194,8 +195,7 @@ void SpellCheck::FillSuggestions(
const base::string16& suggestion = suggestions_list[language][index];
// Only add the suggestion if it's unique.
- if (std::find(optional_suggestions->begin(), optional_suggestions->end(),
- suggestion) == optional_suggestions->end()) {
+ if (!ContainsValue(*optional_suggestions, suggestion)) {
optional_suggestions->push_back(suggestion);
}
if (optional_suggestions->size() >=
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/l10n_util.cc ('k') | chrome/test/chromedriver/chrome/device_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698