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

Unified Diff: chrome/browser/android/preferences/website_preference_bridge.cc

Issue 2950803002: Use ContainsValue() instead of std::find() in chrome/browser/ and chrome/test/ (Closed)
Patch Set: 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/android/preferences/website_preference_bridge.cc
diff --git a/chrome/browser/android/preferences/website_preference_bridge.cc b/chrome/browser/android/preferences/website_preference_bridge.cc
index d36fb8c89b1205cfffe4d46870208439a0b521d1..ffb8247e17d9f60245e8b3fa27e57335bf9e3f47 100644
--- a/chrome/browser/android/preferences/website_preference_bridge.cc
+++ b/chrome/browser/android/preferences/website_preference_bridge.cc
@@ -18,6 +18,7 @@
#include "base/json/json_writer.h"
#include "base/logging.h"
#include "base/macros.h"
+#include "base/stl_util.h"
#include "chrome/browser/android/search_geolocation/search_geolocation_service.h"
#include "chrome/browser/browsing_data/browsing_data_flash_lso_helper.h"
#include "chrome/browser/browsing_data/browsing_data_local_storage_helper.h"
@@ -167,8 +168,7 @@ void GetOrigins(JNIEnv* env,
for (const auto& settings_it : embargo_settings) {
const std::string origin = settings_it.primary_pattern.ToString();
- if (std::find(seen_origins.begin(), seen_origins.end(), origin) !=
- seen_origins.end()) {
+ if (base::ContainsValue(seen_origins, origin)) {
// This origin has already been added to the list, so don't add it again.
continue;
}

Powered by Google App Engine
This is Rietveld 408576698