Index: ui/message_center/views/message_list_view.cc |
diff --git a/ui/message_center/views/message_list_view.cc b/ui/message_center/views/message_list_view.cc |
index a5c77aab3c2bd015c98d8b3cdd72e17cfd505989..ed908fab5556861997db31e48e7a54d5bff618af 100644 |
--- a/ui/message_center/views/message_list_view.cc |
+++ b/ui/message_center/views/message_list_view.cc |
@@ -2,18 +2,18 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include <algorithm> |
+#include "ui/message_center/views/message_list_view.h" |
#include "base/command_line.h" |
#include "base/location.h" |
#include "base/message_loop/message_loop.h" |
#include "base/single_thread_task_runner.h" |
+#include "base/stl_util.h" |
#include "base/threading/thread_task_runner_handle.h" |
#include "ui/gfx/animation/slide_animation.h" |
#include "ui/message_center/message_center_style.h" |
#include "ui/message_center/message_center_switches.h" |
#include "ui/message_center/views/message_center_view.h" |
-#include "ui/message_center/views/message_list_view.h" |
#include "ui/message_center/views/message_view.h" |
#include "ui/views/background.h" |
#include "ui/views/border.h" |
@@ -104,8 +104,7 @@ void MessageListView::RemoveNotification(MessageView* view) { |
// TODO(yhananda): We should consider consolidating clearing_all_views_, |
// deleting_views_ and deleted_when_done_. |
- if (std::find(clearing_all_views_.begin(), clearing_all_views_.end(), view) != |
- clearing_all_views_.end() || |
+ if (base::ContainsValue(clearing_all_views_, view) || |
deleting_views_.find(view) != deleting_views_.end() || |
deleted_when_done_.find(view) != deleted_when_done_.end()) { |
// Let's skip deleting the view if it's already scheduled for deleting. |
@@ -137,8 +136,7 @@ void MessageListView::RemoveNotification(MessageView* view) { |
void MessageListView::UpdateNotification(MessageView* view, |
const Notification& notification) { |
// Skip updating the notification being cleared |
- if (std::find(clearing_all_views_.begin(), clearing_all_views_.end(), view) != |
- clearing_all_views_.end()) |
+ if (base::ContainsValue(clearing_all_views_, view)) |
return; |
int index = GetIndexOf(view); |
@@ -344,8 +342,7 @@ bool MessageListView::IsValidChild(const views::View* child) const { |
deleting_views_.end() && |
deleted_when_done_.find(const_cast<views::View*>(child)) == |
deleted_when_done_.end() && |
- std::find(clearing_all_views_.begin(), clearing_all_views_.end(), |
- child) == clearing_all_views_.end(); |
+ !base::ContainsValue(clearing_all_views_, child); |
} |
void MessageListView::DoUpdateIfPossible() { |