Index: chrome/browser/notifications/notification_ui_manager_impl.cc |
diff --git a/chrome/browser/notifications/notification_ui_manager_impl.cc b/chrome/browser/notifications/notification_ui_manager_impl.cc |
index 79cfef76b459e07bcf3673ed26c456d5b576ca9d..075795526e68be2ad3633a3365f673126a5894b2 100644 |
--- a/chrome/browser/notifications/notification_ui_manager_impl.cc |
+++ b/chrome/browser/notifications/notification_ui_manager_impl.cc |
@@ -66,7 +66,7 @@ NotificationUIManagerImpl::~NotificationUIManagerImpl() { |
void NotificationUIManagerImpl::Add(const Notification& notification, |
Profile* profile) { |
- if (TryReplacement(notification)) { |
+ if (TryReplacement(notification, profile)) { |
return; |
} |
@@ -161,7 +161,7 @@ void NotificationUIManagerImpl::ShowNotifications() { |
} |
bool NotificationUIManagerImpl::TryReplacement( |
- const Notification& notification) { |
+ const Notification& notification, Profile* profile) { |
const GURL& origin = notification.origin_url(); |
const string16& replace_id = notification.replace_id(); |
@@ -172,7 +172,8 @@ bool NotificationUIManagerImpl::TryReplacement( |
// Then check the list of notifications already being shown. |
for (NotificationDeque::const_iterator iter = show_queue_.begin(); |
iter != show_queue_.end(); ++iter) { |
- if (origin == (*iter)->notification().origin_url() && |
+ if (profile == (*iter)->profile() && |
+ origin == (*iter)->notification().origin_url() && |
replace_id == (*iter)->notification().replace_id()) { |
(*iter)->Replace(notification); |
return true; |
@@ -180,7 +181,7 @@ bool NotificationUIManagerImpl::TryReplacement( |
} |
// Give the subclass the opportunity to update existing notification. |
- return UpdateNotification(notification); |
+ return UpdateNotification(notification, profile); |
} |
void NotificationUIManagerImpl::GetQueuedNotificationsForTesting( |