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

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: 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/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 37aad8ce73b8eb529131124bf9670c9e65c5ccfd..4a3f37f9f761f6adb321401f6fcfca2dac518e1b 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"
@@ -325,10 +325,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