diff options
Diffstat (limited to 'chrome/browser/local_discovery/privet_notifications.cc')
-rw-r--r-- | chrome/browser/local_discovery/privet_notifications.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/chrome/browser/local_discovery/privet_notifications.cc b/chrome/browser/local_discovery/privet_notifications.cc index b378a64..e5c329a 100644 --- a/chrome/browser/local_discovery/privet_notifications.cc +++ b/chrome/browser/local_discovery/privet_notifications.cc @@ -8,6 +8,7 @@ #include "base/message_loop/message_loop.h" #include "base/rand_util.h" #include "base/strings/utf_string_conversions.h" +#include "chrome/browser/browser_process.h" #include "chrome/browser/local_discovery/privet_device_lister_impl.h" #include "chrome/browser/notifications/notification.h" #include "chrome/browser/profiles/profile.h" @@ -148,10 +149,8 @@ PrivetNotificationsListener::DeviceContext::~DeviceContext() { } PrivetNotificationService::PrivetNotificationService( - content::BrowserContext* profile, - NotificationUIManager* notification_manager) - : profile_(profile), - notification_manager_(notification_manager) { + content::BrowserContext* profile) + : profile_(profile) { base::MessageLoop::current()->PostDelayedTask( FROM_HERE, base::Bind(&PrivetNotificationService::Start, AsWeakPtr()), @@ -210,13 +209,15 @@ void PrivetNotificationService::PrivetNotify( rich_notification_data, new PrivetNotificationDelegate(device_name, profile_)); - notification_manager_->Add(notification, profile_object); + g_browser_process->notification_ui_manager()->Add(notification, + profile_object); } } void PrivetNotificationService::PrivetRemoveNotification( const std::string& device_name) { - notification_manager_->CancelById(kPrivetNotificationIDPrefix + device_name); + g_browser_process->notification_ui_manager()->CancelById( + kPrivetNotificationIDPrefix + device_name); } void PrivetNotificationService::Start() { |