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

Unified Diff: chrome/browser/ui/ash/launcher/multi_profile_browser_status_monitor.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
Index: chrome/browser/ui/ash/launcher/multi_profile_browser_status_monitor.cc
diff --git a/chrome/browser/ui/ash/launcher/multi_profile_browser_status_monitor.cc b/chrome/browser/ui/ash/launcher/multi_profile_browser_status_monitor.cc
index 55fd11518b3d845c3902c0f1dae0fcd2dd1d2126..f8646a36b69a3be238f191bd4459cc657502abc5 100644
--- a/chrome/browser/ui/ash/launcher/multi_profile_browser_status_monitor.cc
+++ b/chrome/browser/ui/ash/launcher/multi_profile_browser_status_monitor.cc
@@ -6,6 +6,7 @@
#include "ash/public/cpp/shelf_item.h"
#include "ash/public/cpp/window_properties.h"
+#include "base/stl_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
@@ -93,8 +94,7 @@ void MultiProfileBrowserStatusMonitor::ActiveUserChanged(
void MultiProfileBrowserStatusMonitor::AddV1AppToShelf(Browser* browser) {
DCHECK(browser->is_type_popup() && browser->is_app());
- DCHECK(std::find(app_list_.begin(), app_list_.end(), browser) ==
- app_list_.end());
+ DCHECK(!base::ContainsValue(app_list_, browser));
app_list_.push_back(browser);
if (multi_user_util::IsProfileFromActiveUser(browser->profile())) {
BrowserStatusMonitor::AddV1AppToShelf(browser);
« no previous file with comments | « chrome/browser/ui/app_list/arc/arc_app_unittest.cc ('k') | chrome/browser/ui/aura/accessibility/ax_root_obj_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698