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

Unified Diff: chrome/browser/notifications/balloon_notification_ui_manager.cc

Issue 11958025: Start delegating notifications to MessageCenter on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: another build fix Created 7 years, 11 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/balloon_notification_ui_manager.cc
diff --git a/chrome/browser/notifications/balloon_notification_ui_manager.cc b/chrome/browser/notifications/balloon_notification_ui_manager.cc
index 7fce9dba8354f64f21ffcd70eb09201776c69418..a793254ff799eb8d3bc28532d8dfb7cc02b851df 100644
--- a/chrome/browser/notifications/balloon_notification_ui_manager.cc
+++ b/chrome/browser/notifications/balloon_notification_ui_manager.cc
@@ -79,7 +79,8 @@ NotificationPrefsManager* BalloonNotificationUIManager::prefs_manager() {
}
bool BalloonNotificationUIManager::ShowNotification(
- const Notification& notification, Profile* profile) {
+ const Notification& notification,
+ Profile* profile) {
if (!balloon_collection_->HasSpace())
return false;
balloon_collection_->Add(notification, profile);
@@ -91,7 +92,8 @@ void BalloonNotificationUIManager::OnBalloonSpaceChanged() {
}
bool BalloonNotificationUIManager::UpdateNotification(
- const Notification& notification) {
+ const Notification& notification,
+ Profile* profile) {
const GURL& origin = notification.origin_url();
const string16& replace_id = notification.replace_id();
@@ -101,7 +103,8 @@ bool BalloonNotificationUIManager::UpdateNotification(
balloon_collection_->GetActiveBalloons();
for (BalloonCollection::Balloons::const_iterator iter = balloons.begin();
iter != balloons.end(); ++iter) {
- if (origin == (*iter)->notification().origin_url() &&
+ if (profile == (*iter)->profile() &&
+ origin == (*iter)->notification().origin_url() &&
replace_id == (*iter)->notification().replace_id()) {
(*iter)->Update(notification);
return true;

Powered by Google App Engine
This is Rietveld 408576698