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

Unified Diff: chrome/browser/status_icons/desktop_notification_balloon.cc

Issue 768373002: Remove DesktopNotificationService::AddIconNotification. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove comment Created 6 years 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 | « chrome/browser/notifications/desktop_notification_service.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/status_icons/desktop_notification_balloon.cc
diff --git a/chrome/browser/status_icons/desktop_notification_balloon.cc b/chrome/browser/status_icons/desktop_notification_balloon.cc
index 1974b649683a3cd8d4523cea2a0a61a8b58b3e4a..6bddb5bc1ec2941f4f6d7ef521e2a2b29249f50d 100644
--- a/chrome/browser/status_icons/desktop_notification_balloon.cc
+++ b/chrome/browser/status_icons/desktop_notification_balloon.cc
@@ -79,13 +79,14 @@ void DesktopNotificationBalloon::DisplayBalloon(
base::ThreadRestrictions::ScopedAllowIO allow_io;
profile = ProfileManager::GetLastUsedProfile();
}
- notification_id_ = DesktopNotificationService::AddIconNotification(
- GURL(),
- title,
- contents,
- gfx::Image(icon),
- base::string16(),
- new DummyNotificationDelegate(base::IntToString(id_count_++), profile_),
- profile);
+
+ NotificationDelegate* delegate =
+ new DummyNotificationDelegate(base::IntToString(id_count_++), profile_);
+ Notification notification(GURL(), title, contents, gfx::Image(icon),
+ base::string16(), base::string16(), delegate);
+
+ g_browser_process->notification_ui_manager()->Add(notification, profile);
+
+ notification_id_ = notification.delegate_id();
profile_ = profile;
}
« no previous file with comments | « chrome/browser/notifications/desktop_notification_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698