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

Unified Diff: chrome/browser/autofill/autofill_browsertest.cc

Issue 2950803002: Use ContainsValue() instead of std::find() in chrome/browser/ and chrome/test/ (Closed)
Patch Set: Reverted code for file thumbnail_cache.cc 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/autofill/autofill_browsertest.cc
diff --git a/chrome/browser/autofill/autofill_browsertest.cc b/chrome/browser/autofill/autofill_browsertest.cc
index 305b5d17f9f453f77a32f6b5e859496ebae1eece..62fb446ecd07501c3a64cf277ea5571663d1faa7 100644
--- a/chrome/browser/autofill/autofill_browsertest.cc
+++ b/chrome/browser/autofill/autofill_browsertest.cc
@@ -13,6 +13,7 @@
#include "base/message_loop/message_loop.h"
#include "base/rand_util.h"
#include "base/run_loop.h"
+#include "base/stl_util.h"
#include "base/strings/string16.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
@@ -358,10 +359,8 @@ IN_PROC_BROWSER_TEST_F(AutofillTest, FillProfileCrazyCharacters) {
SetProfiles(&profiles);
ASSERT_EQ(profiles.size(), personal_data_manager()->GetProfiles().size());
for (size_t i = 0; i < profiles.size(); ++i) {
- EXPECT_TRUE(std::find(profiles.begin(),
- profiles.end(),
- *personal_data_manager()->GetProfiles()[i]) !=
- profiles.end());
+ EXPECT_TRUE(base::ContainsValue(
+ profiles, *personal_data_manager()->GetProfiles()[i]));
}
std::vector<CreditCard> cards;
@@ -413,10 +412,8 @@ IN_PROC_BROWSER_TEST_F(AutofillTest, FillProfileCrazyCharacters) {
SetCards(&cards);
ASSERT_EQ(cards.size(), personal_data_manager()->GetCreditCards().size());
for (size_t i = 0; i < cards.size(); ++i) {
- EXPECT_TRUE(std::find(cards.begin(),
- cards.end(),
- *personal_data_manager()->GetCreditCards()[i]) !=
- cards.end());
+ EXPECT_TRUE(base::ContainsValue(
+ cards, *personal_data_manager()->GetCreditCards()[i]));
}
}
« no previous file with comments | « chrome/browser/android/preferences/website_preference_bridge.cc ('k') | chrome/browser/browsing_data/browsing_data_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698