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

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

Issue 2314833002: Remove some uses of stl_util's STLDeleteContainerPointers. (Closed)
Patch Set: cleanup Created 4 years, 3 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/notification_list.cc ('k') | no next file » | 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 NotificationList::PopupNotifications GetPopups() { 82 NotificationList::PopupNotifications GetPopups() {
83 return notification_list()->GetPopupNotifications(blockers_, NULL); 83 return notification_list()->GetPopupNotifications(blockers_, NULL);
84 } 84 }
85 85
86 size_t GetPopupCounts() { 86 size_t GetPopupCounts() {
87 return GetPopups().size(); 87 return GetPopups().size();
88 } 88 }
89 89
90 Notification* GetNotification(const std::string& id) { 90 Notification* GetNotification(const std::string& id) {
91 NotificationList::Notifications::iterator iter = 91 auto iter = notification_list()->GetNotification(id);
92 notification_list()->GetNotification(id);
93 if (iter == notification_list()->notifications_.end()) 92 if (iter == notification_list()->notifications_.end())
94 return NULL; 93 return NULL;
95 return *iter; 94 return iter->get();
96 } 95 }
97 96
98 NotificationList* notification_list() { return notification_list_.get(); } 97 NotificationList* notification_list() { return notification_list_.get(); }
99 const NotificationBlockers& blockers() const { return blockers_; } 98 const NotificationBlockers& blockers() const { return blockers_; }
100 99
101 static const char kIdFormat[]; 100 static const char kIdFormat[];
102 static const char kTitleFormat[]; 101 static const char kTitleFormat[];
103 static const char kMessageFormat[]; 102 static const char kMessageFormat[];
104 static const char kDisplaySource[]; 103 static const char kDisplaySource[];
105 static const char kExtensionId[]; 104 static const char kExtensionId[];
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 NotifierId(), RichNotificationData(), NULL)); 661 NotifierId(), RichNotificationData(), NULL));
663 notification_list()->AddNotification(std::move(updated_notification)); 662 notification_list()->AddNotification(std::move(updated_notification));
664 663
665 EXPECT_FALSE(notification_list()->HasNotificationOfType( 664 EXPECT_FALSE(notification_list()->HasNotificationOfType(
666 id, message_center::NOTIFICATION_TYPE_SIMPLE)); 665 id, message_center::NOTIFICATION_TYPE_SIMPLE));
667 EXPECT_TRUE(notification_list()->HasNotificationOfType( 666 EXPECT_TRUE(notification_list()->HasNotificationOfType(
668 id, message_center::NOTIFICATION_TYPE_PROGRESS)); 667 id, message_center::NOTIFICATION_TYPE_PROGRESS));
669 } 668 }
670 669
671 } // namespace message_center 670 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/message_center/notification_list.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698