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

Side by Side Diff: chrome/browser/notifications/message_center_notification_manager.h

Issue 14205012: Fixes possible crashes for ProfileNotification is not found. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/notifications/message_center_notification_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_NOTIFICATIONS_MESSAGE_CENTER_NOTIFICATION_MANAGER_H_ 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_MESSAGE_CENTER_NOTIFICATION_MANAGER_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_MESSAGE_CENTER_NOTIFICATION_MANAGER_H_ 6 #define CHROME_BROWSER_NOTIFICATIONS_MESSAGE_CENTER_NOTIFICATION_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 NotificationMap profile_notifications_; 136 NotificationMap profile_notifications_;
137 137
138 scoped_ptr<MessageCenterSettingsController> settings_controller_; 138 scoped_ptr<MessageCenterSettingsController> settings_controller_;
139 139
140 // Helpers that add/remove the notification from local map and MessageCenter. 140 // Helpers that add/remove the notification from local map and MessageCenter.
141 // They take ownership of profile_notification object. 141 // They take ownership of profile_notification object.
142 void AddProfileNotification(ProfileNotification* profile_notification); 142 void AddProfileNotification(ProfileNotification* profile_notification);
143 void RemoveProfileNotification(ProfileNotification* profile_notification, 143 void RemoveProfileNotification(ProfileNotification* profile_notification,
144 bool by_user); 144 bool by_user);
145 145
146 // Returns the ProfileNotification for the |id|, or NULL if no such
147 // notification is found.
146 ProfileNotification* FindProfileNotification(const std::string& id) const; 148 ProfileNotification* FindProfileNotification(const std::string& id) const;
147 149
148 DISALLOW_COPY_AND_ASSIGN(MessageCenterNotificationManager); 150 DISALLOW_COPY_AND_ASSIGN(MessageCenterNotificationManager);
149 }; 151 };
150 152
151 #endif // CHROME_BROWSER_NOTIFICATIONS_MESSAGE_CENTER_NOTIFICATION_MANAGER_H_ 153 #endif // CHROME_BROWSER_NOTIFICATIONS_MESSAGE_CENTER_NOTIFICATION_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/notifications/message_center_notification_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698