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

Unified Diff: chrome/browser/drive/drive_notification_manager_factory.cc

Issue 23514025: Use GetForBrowserContext instead of GetForProfile for DriveNotificationManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase & resolve conflict Created 7 years, 3 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/drive/drive_notification_manager_factory.cc
diff --git a/chrome/browser/drive/drive_notification_manager_factory.cc b/chrome/browser/drive/drive_notification_manager_factory.cc
index 4792e08425858c1e72f01916b93a35fc382db41e..3583773061252885dca138fcb95d1e059cd31008 100644
--- a/chrome/browser/drive/drive_notification_manager_factory.cc
+++ b/chrome/browser/drive/drive_notification_manager_factory.cc
@@ -15,12 +15,13 @@ namespace drive {
// static
DriveNotificationManager*
-DriveNotificationManagerFactory::GetForProfile(Profile* profile) {
+DriveNotificationManagerFactory::GetForBrowserContext(
+ content::BrowserContext* context) {
if (!ProfileSyncService::IsSyncEnabled())
return NULL;
return static_cast<DriveNotificationManager*>(
- GetInstance()->GetServiceForBrowserContext(profile, true));
+ GetInstance()->GetServiceForBrowserContext(context, true));
}
// static
@@ -41,8 +42,10 @@ DriveNotificationManagerFactory::~DriveNotificationManagerFactory() {}
BrowserContextKeyedService*
DriveNotificationManagerFactory::BuildServiceInstanceFor(
- content::BrowserContext* profile) const {
- return new DriveNotificationManager(static_cast<Profile*>(profile));
+ content::BrowserContext* context) const {
+ return new DriveNotificationManager(
+ invalidation::InvalidationServiceFactory::GetForProfile(
+ Profile::FromBrowserContext(context)));
}
} // namespace drive

Powered by Google App Engine
This is Rietveld 408576698