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

Side by Side Diff: ui/message_center/notification_list.cc

Issue 2230183002: ui: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « ui/message_center/message_center_impl.cc ('k') | ui/message_center/popup_timers_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/message_center/notification_list.h" 5 #include "ui/message_center/notification_list.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 return false; 54 return false;
55 return false; 55 return false;
56 } 56 }
57 57
58 NotificationList::NotificationList(MessageCenter* message_center) 58 NotificationList::NotificationList(MessageCenter* message_center)
59 : message_center_(message_center), 59 : message_center_(message_center),
60 quiet_mode_(false) { 60 quiet_mode_(false) {
61 } 61 }
62 62
63 NotificationList::~NotificationList() { 63 NotificationList::~NotificationList() {
64 STLDeleteContainerPointers(notifications_.begin(), notifications_.end()); 64 base::STLDeleteContainerPointers(notifications_.begin(),
65 notifications_.end());
65 } 66 }
66 67
67 void NotificationList::SetNotificationsShown( 68 void NotificationList::SetNotificationsShown(
68 const NotificationBlockers& blockers, 69 const NotificationBlockers& blockers,
69 std::set<std::string>* updated_ids) { 70 std::set<std::string>* updated_ids) {
70 Notifications notifications = GetVisibleNotifications(blockers); 71 Notifications notifications = GetVisibleNotifications(blockers);
71 72
72 for (auto iter = notifications.begin(); iter != notifications.end(); ++iter) { 73 for (auto iter = notifications.begin(); iter != notifications.end(); ++iter) {
73 Notification* notification = *iter; 74 Notification* notification = *iter;
74 bool was_popup = notification->shown_as_popup(); 75 bool was_popup = notification->shown_as_popup();
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 notification->set_shown_as_popup(message_center_->IsMessageCenterVisible() 344 notification->set_shown_as_popup(message_center_->IsMessageCenterVisible()
344 || quiet_mode_ 345 || quiet_mode_
345 || notification->shown_as_popup()); 346 || notification->shown_as_popup());
346 } 347 }
347 // Take ownership. The notification can only be removed from the list 348 // Take ownership. The notification can only be removed from the list
348 // in EraseNotification(), which will delete it. 349 // in EraseNotification(), which will delete it.
349 notifications_.insert(notification.release()); 350 notifications_.insert(notification.release());
350 } 351 }
351 352
352 } // namespace message_center 353 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/message_center/message_center_impl.cc ('k') | ui/message_center/popup_timers_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698