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

Unified Diff: chrome/browser/notifications/notification_ui_manager_mac.mm

Issue 10690192: [Mac] Only attempt to replace a notification if the replacement_id is not empty. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/notifications/notification_ui_manager_mac.mm
diff --git a/chrome/browser/notifications/notification_ui_manager_mac.mm b/chrome/browser/notifications/notification_ui_manager_mac.mm
index ba74927e01f26963e541abb28ceca7f8035e0a15..cd10fd6719aaaa85949cb3da8bfc6cd5c7d3e824 100644
--- a/chrome/browser/notifications/notification_ui_manager_mac.mm
+++ b/chrome/browser/notifications/notification_ui_manager_mac.mm
@@ -128,10 +128,12 @@ void NotificationUIManagerMac::Add(const Notification& notification,
if (notification.is_html()) {
builtin_manager_->Add(notification, profile);
} else {
- id<CrUserNotification> replacee = FindNotificationWithReplacementId(
- notification.replace_id());
- if (replacee)
- RemoveNotification(replacee);
+ if (!notification.replace_id().empty()) {
+ id<CrUserNotification> replacee = FindNotificationWithReplacementId(
+ notification.replace_id());
+ if (replacee)
+ RemoveNotification(replacee);
+ }
// Owned by ControllerNotification.
id<CrUserNotification> ns_notification =
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698