summaryrefslogtreecommitdiffstats
path: root/chrome/browser/notifications
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-22 23:25:44 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-22 23:25:44 +0000
commitf1484c5242850142011c4db4572b9b742f6b56f5 (patch)
tree6cc51ae1fca2aea4a7f76ab9171a4247eff78a9f /chrome/browser/notifications
parent59bf05a05ddf1bec2d2a4ad6d38a3338a41b7805 (diff)
downloadchromium_src-f1484c5242850142011c4db4572b9b742f6b56f5.zip
chromium_src-f1484c5242850142011c4db4572b9b742f6b56f5.tar.gz
chromium_src-f1484c5242850142011c4db4572b9b742f6b56f5.tar.bz2
Remove references to Profile from browser_context_keyed_service.
BUG=227219 R=joi@chromium.org Review URL: https://codereview.chromium.org/15517005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201634 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/notifications')
-rw-r--r--chrome/browser/notifications/desktop_notification_service.h2
-rw-r--r--chrome/browser/notifications/desktop_notification_service_factory.cc10
-rw-r--r--chrome/browser/notifications/desktop_notification_service_factory.h7
-rw-r--r--chrome/browser/notifications/sync_notifier/chrome_notifier_service.cc2
-rw-r--r--chrome/browser/notifications/sync_notifier/chrome_notifier_service.h4
-rw-r--r--chrome/browser/notifications/sync_notifier/chrome_notifier_service_factory.cc9
-rw-r--r--chrome/browser/notifications/sync_notifier/chrome_notifier_service_factory.h6
7 files changed, 22 insertions, 18 deletions
diff --git a/chrome/browser/notifications/desktop_notification_service.h b/chrome/browser/notifications/desktop_notification_service.h
index 787d035..866b63f 100644
--- a/chrome/browser/notifications/desktop_notification_service.h
+++ b/chrome/browser/notifications/desktop_notification_service.h
@@ -44,7 +44,7 @@ class PrefRegistrySyncable;
// The DesktopNotificationService is an object, owned by the Profile,
// which provides the creation of desktop "toasts" to web pages and workers.
-class DesktopNotificationService : public ProfileKeyedService,
+class DesktopNotificationService : public BrowserContextKeyedService,
public content::NotificationObserver {
public:
enum DesktopNotificationSource {
diff --git a/chrome/browser/notifications/desktop_notification_service_factory.cc b/chrome/browser/notifications/desktop_notification_service_factory.cc
index acf6b51..f8b958a 100644
--- a/chrome/browser/notifications/desktop_notification_service_factory.cc
+++ b/chrome/browser/notifications/desktop_notification_service_factory.cc
@@ -18,7 +18,7 @@ DesktopNotificationService* DesktopNotificationServiceFactory::GetForProfile(
Profile* profile) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
return static_cast<DesktopNotificationService*>(
- GetInstance()->GetServiceForProfile(profile, true));
+ GetInstance()->GetServiceForBrowserContext(profile, true));
}
// static
@@ -28,14 +28,16 @@ DesktopNotificationServiceFactory* DesktopNotificationServiceFactory::
}
DesktopNotificationServiceFactory::DesktopNotificationServiceFactory()
- : ProfileKeyedServiceFactory("DesktopNotificationService",
- ProfileDependencyManager::GetInstance()) {
+ : BrowserContextKeyedServiceFactory(
+ "DesktopNotificationService",
+ BrowserContextDependencyManager::GetInstance()) {
}
DesktopNotificationServiceFactory::~DesktopNotificationServiceFactory() {
}
-ProfileKeyedService* DesktopNotificationServiceFactory::BuildServiceInstanceFor(
+BrowserContextKeyedService*
+DesktopNotificationServiceFactory::BuildServiceInstanceFor(
content::BrowserContext* profile) const {
DesktopNotificationService* service =
new DesktopNotificationService(static_cast<Profile*>(profile), NULL);
diff --git a/chrome/browser/notifications/desktop_notification_service_factory.h b/chrome/browser/notifications/desktop_notification_service_factory.h
index 10a6c09..c616b50 100644
--- a/chrome/browser/notifications/desktop_notification_service_factory.h
+++ b/chrome/browser/notifications/desktop_notification_service_factory.h
@@ -15,7 +15,8 @@ class Profile;
// Singleton that owns all DesktopNotificationServices and associates them with
// Profiles. Listens for the Profile's destruction notification and cleans up
// the associated DesktopNotificationService.
-class DesktopNotificationServiceFactory : public ProfileKeyedServiceFactory {
+class DesktopNotificationServiceFactory
+ : public BrowserContextKeyedServiceFactory {
public:
// Returns the DesktopNotificationService that provides desktop notifications
// for |profile|.
@@ -29,8 +30,8 @@ class DesktopNotificationServiceFactory : public ProfileKeyedServiceFactory {
DesktopNotificationServiceFactory();
virtual ~DesktopNotificationServiceFactory();
- // ProfileKeyedServiceFactory:
- virtual ProfileKeyedService* BuildServiceInstanceFor(
+ // BrowserContextKeyedServiceFactory:
+ virtual BrowserContextKeyedService* BuildServiceInstanceFor(
content::BrowserContext* profile) const OVERRIDE;
virtual content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const OVERRIDE;
diff --git a/chrome/browser/notifications/sync_notifier/chrome_notifier_service.cc b/chrome/browser/notifications/sync_notifier/chrome_notifier_service.cc
index 5ce35d9..8432999 100644
--- a/chrome/browser/notifications/sync_notifier/chrome_notifier_service.cc
+++ b/chrome/browser/notifications/sync_notifier/chrome_notifier_service.cc
@@ -26,7 +26,7 @@ ChromeNotifierService::ChromeNotifierService(Profile* profile,
: profile_(profile), notification_manager_(manager) {}
ChromeNotifierService::~ChromeNotifierService() {}
-// Methods from ProfileKeyedService.
+// Methods from BrowserContextKeyedService.
void ChromeNotifierService::Shutdown() {
}
diff --git a/chrome/browser/notifications/sync_notifier/chrome_notifier_service.h b/chrome/browser/notifications/sync_notifier/chrome_notifier_service.h
index f99cd7a..ddbfc3d 100644
--- a/chrome/browser/notifications/sync_notifier/chrome_notifier_service.h
+++ b/chrome/browser/notifications/sync_notifier/chrome_notifier_service.h
@@ -23,12 +23,12 @@ namespace notifier {
// delivered notifications for chrome. These are obtained from the sync service
// and kept up to date.
class ChromeNotifierService : public syncer::SyncableService,
- public ProfileKeyedService {
+ public BrowserContextKeyedService {
public:
ChromeNotifierService(Profile* profile, NotificationUIManager* manager);
virtual ~ChromeNotifierService();
- // Methods from ProfileKeyedService.
+ // Methods from BrowserContextKeyedService.
virtual void Shutdown() OVERRIDE;
// syncer::SyncableService implementation.
diff --git a/chrome/browser/notifications/sync_notifier/chrome_notifier_service_factory.cc b/chrome/browser/notifications/sync_notifier/chrome_notifier_service_factory.cc
index 812a71b..a029c4d 100644
--- a/chrome/browser/notifications/sync_notifier/chrome_notifier_service_factory.cc
+++ b/chrome/browser/notifications/sync_notifier/chrome_notifier_service_factory.cc
@@ -14,7 +14,7 @@ namespace notifier {
ChromeNotifierService* ChromeNotifierServiceFactory::GetForProfile(
Profile* profile, Profile::ServiceAccessType sat) {
return static_cast<ChromeNotifierService*>(
- GetInstance()->GetServiceForProfile(profile, true));
+ GetInstance()->GetServiceForBrowserContext(profile, true));
}
// static
@@ -23,13 +23,14 @@ ChromeNotifierServiceFactory* ChromeNotifierServiceFactory::GetInstance() {
}
ChromeNotifierServiceFactory::ChromeNotifierServiceFactory()
- : ProfileKeyedServiceFactory(
- "ChromeNotifierService", ProfileDependencyManager::GetInstance()) {}
+ : BrowserContextKeyedServiceFactory(
+ "ChromeNotifierService",
+ BrowserContextDependencyManager::GetInstance()) {}
ChromeNotifierServiceFactory::~ChromeNotifierServiceFactory() {
}
-ProfileKeyedService*
+BrowserContextKeyedService*
ChromeNotifierServiceFactory::BuildServiceInstanceFor(
content::BrowserContext* profile) const {
NotificationUIManager* notification_manager =
diff --git a/chrome/browser/notifications/sync_notifier/chrome_notifier_service_factory.h b/chrome/browser/notifications/sync_notifier/chrome_notifier_service_factory.h
index 2fe308f..2261f9c 100644
--- a/chrome/browser/notifications/sync_notifier/chrome_notifier_service_factory.h
+++ b/chrome/browser/notifications/sync_notifier/chrome_notifier_service_factory.h
@@ -13,7 +13,7 @@ namespace notifier {
class ChromeNotifierService;
-class ChromeNotifierServiceFactory : public ProfileKeyedServiceFactory {
+class ChromeNotifierServiceFactory : public BrowserContextKeyedServiceFactory {
public:
static ChromeNotifierService* GetForProfile(
Profile* profile, Profile::ServiceAccessType sat);
@@ -26,8 +26,8 @@ class ChromeNotifierServiceFactory : public ProfileKeyedServiceFactory {
ChromeNotifierServiceFactory();
virtual ~ChromeNotifierServiceFactory();
- // ProfileKeyedServiceFactory:
- virtual ProfileKeyedService* BuildServiceInstanceFor(
+ // BrowserContextKeyedServiceFactory:
+ virtual BrowserContextKeyedService* BuildServiceInstanceFor(
content::BrowserContext* profile) const OVERRIDE;
};