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

Unified Diff: chrome/browser/safe_browsing/incident_reporting/environment_data_collection_win_unittest.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/incident_reporting/environment_data_collection_win_unittest.cc
diff --git a/chrome/browser/safe_browsing/incident_reporting/environment_data_collection_win_unittest.cc b/chrome/browser/safe_browsing/incident_reporting/environment_data_collection_win_unittest.cc
index 46c05a509a4cf395a7c656dce0564de9b62d897b..201347142a16536f14c2b2a880bac483223014d4 100644
--- a/chrome/browser/safe_browsing/incident_reporting/environment_data_collection_win_unittest.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/environment_data_collection_win_unittest.cc
@@ -7,13 +7,13 @@
#include <stddef.h>
#include <stdint.h>
-#include <algorithm>
#include <string>
#include "base/base_paths.h"
#include "base/files/file_path.h"
#include "base/path_service.h"
#include "base/scoped_native_library.h"
+#include "base/stl_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/test_reg_util_win.h"
#include "base/win/registry.h"
@@ -51,14 +51,13 @@ bool DllEntryContainsLspFeature(
const std::string& dll_path) {
for (const auto& dll : process_report.dll()) {
if (dll.path() == dll_path &&
- std::find(dll.feature().begin(), dll.feature().end(),
- ClientIncidentReport_EnvironmentData_Process_Dll::LSP) !=
- dll.feature().end()) {
+ base::ContainsValue(
+ dll.feature(),
+ ClientIncidentReport_EnvironmentData_Process_Dll::LSP)) {
// LSP feature found.
return true;
}
}
-
return false;
}

Powered by Google App Engine
This is Rietveld 408576698