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

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
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..996db5a54b2cc34f1e320e258cda9a9b4e77453c 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,14 @@ void NotificationList::SetQuietMode(bool quiet_mode) {
}
}
+Notification* NotificationList::GetNotificationById(const std::string& id) {
+ Notifications::iterator iter = GetNotification(id);
+ if (iter != notifications_.end())
+ return *iter;
+ else
dewittj 2014/06/09 19:59:10 nit: no else clause, just return null
juyik 2014/06/09 21:28:08 Done.
+ return NULL;
+}
+
NotificationList::Notifications NotificationList::GetVisibleNotifications(
const NotificationBlockers& blockers) const {
Notifications result;

Powered by Google App Engine
This is Rietveld 408576698