Index: chrome/browser/notifications/message_center_notification_manager.cc |
diff --git a/chrome/browser/notifications/message_center_notification_manager.cc b/chrome/browser/notifications/message_center_notification_manager.cc |
index 7be078329f2219bf73ccc49169562739f342be16..e46a89ae1fe174c38811894808a68c2336422f99 100644 |
--- a/chrome/browser/notifications/message_center_notification_manager.cc |
+++ b/chrome/browser/notifications/message_center_notification_manager.cc |
@@ -70,6 +70,24 @@ bool MessageCenterNotificationManager::CancelById(const std::string& id) { |
return true; |
} |
+void MessageCenterNotificationManager::GetAllIdsByProfileAndSourceOrigin( |
+ Profile* profile, |
+ const GURL& source, |
+ std::set<std::string>* notification_ids) { |
+ DCHECK(notification_ids); |
+ NotificationUIManagerImpl::GetAllIdsByProfileAndSourceOrigin( |
+ profile, source, notification_ids); |
+ |
+ for (NotificationMap::iterator loopiter = profile_notifications_.begin(); |
+ loopiter != profile_notifications_.end();) { |
+ NotificationMap::iterator curiter = loopiter++; |
+ if ((*curiter).second->notification().origin_url() == source && |
+ (*curiter).second->profile() == profile) { |
Dmitry Titov
2013/05/16 20:39:15
Should it be == or IsSameProfile() ?
dewittj
2013/05/16 23:40:34
Good catch, probably the same extension would hand
|
+ notification_ids->insert(curiter->first); |
+ } |
+ } |
+} |
+ |
bool MessageCenterNotificationManager::CancelAllBySourceOrigin( |
const GURL& source) { |
// Same pattern as CancelById, but more complicated than the above |