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

Unified Diff: ui/wm/core/transient_window_manager.cc

Issue 2926793002: Use ContainsValue() instead of std::find() in ui/wm and ui/message_center (Closed)
Patch Set: Changed EXPECT_TRUE to EXPECT_FALSE 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 | « ui/wm/core/shadow_controller.cc ('k') | ui/wm/core/window_animations_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/wm/core/transient_window_manager.cc
diff --git a/ui/wm/core/transient_window_manager.cc b/ui/wm/core/transient_window_manager.cc
index 3bde9721fe8838d7cf662e468fbb1b388cdf7c0e..14c1898159c79d661dd76ec3c9c583d9bd2f057a 100644
--- a/ui/wm/core/transient_window_manager.cc
+++ b/ui/wm/core/transient_window_manager.cc
@@ -8,6 +8,7 @@
#include <functional>
#include "base/auto_reset.h"
+#include "base/stl_util.h"
#include "ui/aura/client/transient_window_client_observer.h"
#include "ui/aura/window.h"
#include "ui/aura/window_tracker.h"
@@ -63,8 +64,7 @@ void TransientWindowManager::AddTransientChild(Window* child) {
TransientWindowManager* child_manager = Get(child);
if (child_manager->transient_parent_)
Get(child_manager->transient_parent_)->RemoveTransientChild(child);
- DCHECK(std::find(transient_children_.begin(), transient_children_.end(),
- child) == transient_children_.end());
+ DCHECK(!base::ContainsValue(transient_children_, child));
transient_children_.push_back(child);
child_manager->transient_parent_ = window_;
« no previous file with comments | « ui/wm/core/shadow_controller.cc ('k') | ui/wm/core/window_animations_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698