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

Unified Diff: chrome/common/extensions/command_unittest.cc

Issue 2958223002: Use ContainsValue() instead of std::find() in chrome/browser and chrome/common (Closed)
Patch Set: Rebase patch. 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
« no previous file with comments | « chrome/browser/translate/translate_manager_render_view_host_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/command_unittest.cc
diff --git a/chrome/common/extensions/command_unittest.cc b/chrome/common/extensions/command_unittest.cc
index b4f4a2ad721e16f9fe42b25e9ef6f896bf4ecefc..ec6d0110cfe219965352340688c49daf89119802 100644
--- a/chrome/common/extensions/command_unittest.cc
+++ b/chrome/common/extensions/command_unittest.cc
@@ -11,6 +11,7 @@
#include "base/macros.h"
#include "base/memory/ptr_util.h"
+#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
@@ -65,8 +66,7 @@ void CheckParse(const ConstCommandsTestData& data,
if (data.key[0] != '\0') {
std::string current_platform = extensions::Command::CommandPlatform();
if (platform_specific_only &&
- std::find(platforms.begin(), platforms.end(), current_platform) ==
- platforms.end()) {
+ !base::ContainsValue(platforms, current_platform)) {
// Given a |current_platform| without a |suggested_key|, |default| is
// used. However, some keys, such as Search on Chrome OS, are only valid
// for platform specific entries. Skip the test in this case.
« no previous file with comments | « chrome/browser/translate/translate_manager_render_view_host_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698