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

Unified Diff: trunk/src/chrome/browser/notifications/message_center_notification_manager.cc

Issue 15925003: Revert 201932 "Add API function chrome.notifications.getAll" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 7 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: trunk/src/chrome/browser/notifications/message_center_notification_manager.cc
===================================================================
--- trunk/src/chrome/browser/notifications/message_center_notification_manager.cc (revision 201968)
+++ trunk/src/chrome/browser/notifications/message_center_notification_manager.cc (working copy)
@@ -70,25 +70,6 @@
return true;
}
-std::set<std::string>
-MessageCenterNotificationManager::GetAllIdsByProfileAndSourceOrigin(
- Profile* profile,
- const GURL& source) {
-
- std::set<std::string> notification_ids =
- NotificationUIManagerImpl::GetAllIdsByProfileAndSourceOrigin(profile,
- source);
-
- for (NotificationMap::iterator iter = profile_notifications_.begin();
- iter != profile_notifications_.end(); iter++) {
- if ((*iter).second->notification().origin_url() == source &&
- profile->IsSameProfile((*iter).second->profile())) {
- notification_ids.insert(iter->first);
- }
- }
- return notification_ids;
-}
-
bool MessageCenterNotificationManager::CancelAllBySourceOrigin(
const GURL& source) {
// Same pattern as CancelById, but more complicated than the above
@@ -113,7 +94,7 @@
for (NotificationMap::iterator loopiter = profile_notifications_.begin();
loopiter != profile_notifications_.end(); ) {
NotificationMap::iterator curiter = loopiter++;
- if (profile->IsSameProfile((*curiter).second->profile())) {
+ if ((*curiter).second->profile() == profile) {
message_center_->RemoveNotification(curiter->first, /* by_user */ false);
removed = true;
}

Powered by Google App Engine
This is Rietveld 408576698