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

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

Issue 6803012: Profile shouldn't own DesktopNotificationService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix dependency manager unit test Created 9 years, 8 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/notification_options_menu_model.cc
diff --git a/chrome/browser/notifications/notification_options_menu_model.cc b/chrome/browser/notifications/notification_options_menu_model.cc
index 0bf75339288b164ae09a8bd6a0427a72f2f9fcb5..7024142d7c02e64e7b7c899f266a5bfc1c5ec7d6 100644
--- a/chrome/browser/notifications/notification_options_menu_model.cc
+++ b/chrome/browser/notifications/notification_options_menu_model.cc
@@ -12,6 +12,7 @@
#include "chrome/browser/notifications/balloon_collection.h"
#include "chrome/browser/notifications/balloon_host.h"
#include "chrome/browser/notifications/desktop_notification_service.h"
+#include "chrome/browser/notifications/desktop_notification_service_factory.h"
#include "chrome/browser/notifications/notification.h"
#include "chrome/browser/notifications/notification_ui_manager.h"
#include "chrome/browser/notifications/notifications_prefs_cache.h"
@@ -160,7 +161,7 @@ string16 NotificationOptionsMenuModel::GetLabelForCommandId(int command_id)
const GURL& origin = notification.origin_url();
DesktopNotificationService* service =
- balloon_->profile()->GetDesktopNotificationService();
+ DesktopNotificationServiceFactory::GetForProfile(balloon_->profile());
if (origin.SchemeIs(chrome::kExtensionScheme)) {
ExtensionService* ext_service =
balloon_->profile()->GetExtensionService();
@@ -210,7 +211,7 @@ bool NotificationOptionsMenuModel::GetAcceleratorForCommandId(
void NotificationOptionsMenuModel::ExecuteCommand(int command_id) {
DesktopNotificationService* service =
- balloon_->profile()->GetDesktopNotificationService();
+ DesktopNotificationServiceFactory::GetForProfile(balloon_->profile());
ExtensionService* ext_service =
balloon_->profile()->GetExtensionService();
const GURL& origin = balloon_->notification().origin_url();

Powered by Google App Engine
This is Rietveld 408576698