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

Unified Diff: ui/message_center/notification_list.cc

Issue 324583002: The 1st patch to disambiguate message center notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 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/message_center/notification_list.h ('k') | ui/message_center/notification_list_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/notification_list.cc
diff --git a/ui/message_center/notification_list.cc b/ui/message_center/notification_list.cc
index 611d4e89a432fda8d5ab333b57d7454cea3ced6d..eac4345657ed1727eed327b2df899a0dddc33a5f 100644
--- a/ui/message_center/notification_list.cc
+++ b/ui/message_center/notification_list.cc
@@ -160,10 +160,6 @@ bool NotificationList::SetNotificationButtonIcon(
return true;
}
-bool NotificationList::HasNotification(const std::string& id) {
- return GetNotification(id) != notifications_.end();
-}
-
bool NotificationList::HasNotificationOfType(const std::string& id,
const NotificationType type) {
Notifications::iterator iter = GetNotification(id);
@@ -271,6 +267,13 @@ void NotificationList::SetQuietMode(bool quiet_mode) {
}
}
+Notification* NotificationList::GetNotificationById(const std::string& id) {
+ Notifications::iterator iter = GetNotification(id);
+ if (iter != notifications_.end())
+ return *iter;
+ return NULL;
+}
+
NotificationList::Notifications NotificationList::GetVisibleNotifications(
const NotificationBlockers& blockers) const {
Notifications result;
« no previous file with comments | « ui/message_center/notification_list.h ('k') | ui/message_center/notification_list_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698