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

Unified Diff: chrome/browser/notifications/message_center_notification_manager.h

Issue 2318303002: Remove stl_util's STLDeleteContainerPairSecondPointers. (Closed)
Patch Set: fix 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/notifications/message_center_notification_manager.h
diff --git a/chrome/browser/notifications/message_center_notification_manager.h b/chrome/browser/notifications/message_center_notification_manager.h
index 8b153dbd47f463fbdf8e0272dc9b1f17a444be1e..8c4d3e255931b6e07d993aeddd00ab89e8bc0163 100644
--- a/chrome/browser/notifications/message_center_notification_manager.h
+++ b/chrome/browser/notifications/message_center_notification_manager.h
@@ -93,13 +93,14 @@ class MessageCenterNotificationManager
message_center::MessageCenter* message_center_; // Weak, global.
// Use a map by notification_id since this mapping is the most often used.
- typedef std::map<std::string, ProfileNotification*> NotificationMap;
- NotificationMap profile_notifications_;
+ std::map<std::string, std::unique_ptr<ProfileNotification>>
+ profile_notifications_;
// Helpers that add/remove the notification from local map.
// The local map takes ownership of profile_notification object.
- void AddProfileNotification(ProfileNotification* profile_notification);
- void RemoveProfileNotification(ProfileNotification* profile_notification);
+ void AddProfileNotification(
+ std::unique_ptr<ProfileNotification> profile_notification);
+ void RemoveProfileNotification(const std::string& notification_id);
// Returns the ProfileNotification for the |id|, or NULL if no such
// notification is found.

Powered by Google App Engine
This is Rietveld 408576698