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

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..794360b4af9511d8a87dfb2d02cf15d9db3195c5 100644
--- a/chrome/browser/notifications/message_center_notification_manager.h
+++ b/chrome/browser/notifications/message_center_notification_manager.h
@@ -93,12 +93,13 @@ 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 AddProfileNotification(
+ std::unique_ptr<ProfileNotification> profile_notification);
void RemoveProfileNotification(ProfileNotification* profile_notification);
// Returns the ProfileNotification for the |id|, or NULL if no such

Powered by Google App Engine
This is Rietveld 408576698