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

Unified Diff: chrome/browser/ui/app_list/arc/arc_app_unittest.cc

Issue 2947593005: Use ContainsValue() instead of std::find() in chrome/browser/ui/ (Closed)
Patch Set: 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 | « no previous file | chrome/browser/ui/ash/launcher/multi_profile_browser_status_monitor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_list/arc/arc_app_unittest.cc
diff --git a/chrome/browser/ui/app_list/arc/arc_app_unittest.cc b/chrome/browser/ui/app_list/arc/arc_app_unittest.cc
index 8f2ec68190c52dc948707ea8dd679b9933216af5..f13be7c7687076f148ebaa1ffc3376c42620a677 100644
--- a/chrome/browser/ui/app_list/arc/arc_app_unittest.cc
+++ b/chrome/browser/ui/app_list/arc/arc_app_unittest.cc
@@ -15,6 +15,7 @@
#include "base/files/file_util.h"
#include "base/macros.h"
#include "base/run_loop.h"
+#include "base/stl_util.h"
#include "base/task_runner_util.h"
#include "base/values.h"
#include "chrome/browser/chromeos/arc/arc_support_host.h"
@@ -278,7 +279,7 @@ class ArcAppModelBuilderTest : public extensions::ExtensionServiceTestBase,
// In principle, order of items is not defined.
for (const auto& app : apps) {
const std::string id = ArcAppTest::GetAppId(app);
- EXPECT_NE(std::find(ids.begin(), ids.end(), id), ids.end());
+ EXPECT_TRUE(base::ContainsValue(ids, id));
std::unique_ptr<ArcAppListPrefs::AppInfo> app_info = prefs->GetApp(id);
ASSERT_NE(nullptr, app_info.get());
EXPECT_EQ(app.name, app_info->name);
@@ -292,7 +293,7 @@ class ArcAppModelBuilderTest : public extensions::ExtensionServiceTestBase,
for (auto& shortcut : shortcuts) {
const std::string id = ArcAppTest::GetAppId(shortcut);
- EXPECT_NE(std::find(ids.begin(), ids.end(), id), ids.end());
+ EXPECT_TRUE(base::ContainsValue(ids, id));
std::unique_ptr<ArcAppListPrefs::AppInfo> app_info = prefs->GetApp(id);
ASSERT_NE(nullptr, app_info.get());
EXPECT_EQ(shortcut.name, app_info->name);
« no previous file with comments | « no previous file | chrome/browser/ui/ash/launcher/multi_profile_browser_status_monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698