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

Unified Diff: chrome/browser/predictors/autocomplete_action_predictor_unittest.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/predictors/autocomplete_action_predictor_unittest.cc
diff --git a/chrome/browser/predictors/autocomplete_action_predictor_unittest.cc b/chrome/browser/predictors/autocomplete_action_predictor_unittest.cc
index f63eeeada77317fd661ee646799b9b19e423559f..49cef54e4637473e3d77f0bd15df3aef00d30de1 100644
--- a/chrome/browser/predictors/autocomplete_action_predictor_unittest.cc
+++ b/chrome/browser/predictors/autocomplete_action_predictor_unittest.cc
@@ -12,6 +12,7 @@
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/run_loop.h"
+#include "base/stl_util.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
@@ -336,10 +337,8 @@ TEST_F(AutocompleteActionPredictorTest, DeleteOldIdsFromCaches) {
for (std::vector<AutocompleteActionPredictorTable::Row::Id>::iterator it =
all_ids.begin();
it != all_ids.end(); ++it) {
- bool in_expected =
- (std::find(expected.begin(), expected.end(), *it) != expected.end());
- bool in_list =
- (std::find(id_list.begin(), id_list.end(), *it) != id_list.end());
+ bool in_expected = base::ContainsValue(expected, *it);
+ bool in_list = base::ContainsValue(id_list, *it);
EXPECT_EQ(in_expected, in_list);
}
}

Powered by Google App Engine
This is Rietveld 408576698