| Index: chrome/browser/local_discovery/privet_notifications.cc
|
| diff --git a/chrome/browser/local_discovery/privet_notifications.cc b/chrome/browser/local_discovery/privet_notifications.cc
|
| index b378a64097150e0c253268c11f8694430af14bc0..e5c329aa3d398d35e7159f6cefec72a2c6efb558 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() {
|
|
|