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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_service_browsertest.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: Removing non ContainsValue changes Created 4 years, 9 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/safe_browsing/safe_browsing_service_browsertest.cc
diff --git a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
index 8b099a0ebbceca3d49782fc64acb89ad93835150..469aed2a418b3d0ce810eba0c08a52ac285529cb 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
@@ -8,7 +8,6 @@
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
-#include <algorithm>
#include <utility>
#include "base/bind.h"
@@ -19,6 +18,7 @@
#include "base/memory/ref_counted.h"
#include "base/metrics/field_trial.h"
#include "base/path_service.h"
+#include "base/stl_util.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
@@ -326,10 +326,8 @@ class TestSafeBrowsingDatabase : public SafeBrowsingDatabase {
continue;
std::vector<int> list_ids_for_url = badurls_it->second.list_ids;
- if (std::find(list_ids_for_url.begin(), list_ids_for_url.end(), list_id0)
- != list_ids_for_url.end() ||
- std::find(list_ids_for_url.begin(), list_ids_for_url.end(), list_id1)
- != list_ids_for_url.end()) {
+ if (ContainsValue(list_ids_for_url, list_id0) ||
+ ContainsValue(list_ids_for_url, list_id1)) {
prefix_hits->insert(prefix_hits->end(),
badurls_it->second.prefix_hits.begin(),
badurls_it->second.prefix_hits.end());

Powered by Google App Engine
This is Rietveld 408576698