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

Unified Diff: chrome/browser/safe_browsing/local_database_manager.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/safe_browsing/local_database_manager.cc
diff --git a/chrome/browser/safe_browsing/local_database_manager.cc b/chrome/browser/safe_browsing/local_database_manager.cc
index f831b7375027b54814f2cb96ef667c3384554277..8b5114ba69a79c5048fc9bfc3c353294a4f8fc1f 100644
--- a/chrome/browser/safe_browsing/local_database_manager.cc
+++ b/chrome/browser/safe_browsing/local_database_manager.cc
@@ -4,7 +4,6 @@
#include "chrome/browser/safe_browsing/local_database_manager.h"
-#include <algorithm>
#include <limits>
#include "base/bind.h"
@@ -16,6 +15,7 @@
#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_macros.h"
#include "base/single_thread_task_runner.h"
+#include "base/stl_util.h"
#include "base/strings/string_util.h"
#include "base/task_scheduler/post_task.h"
#include "base/threading/thread_task_runner_handle.h"
@@ -71,9 +71,7 @@ void RecordGetHashCheckStatus(
bool IsExpectedThreat(const SBThreatType threat_type,
const std::vector<SBThreatType>& expected_threats) {
- return expected_threats.end() != std::find(expected_threats.begin(),
- expected_threats.end(),
- threat_type);
+ return base::ContainsValue(expected_threats, threat_type);
}
// Returns threat level of the list. Lists with lower threat levels are more

Powered by Google App Engine
This is Rietveld 408576698