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

Side by Side Diff: chrome/browser/drive/drive_notification_manager_factory.h

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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_DRIVE_DRIVE_NOTIFICATION_MANAGER_FACTORY_H_ 5 #ifndef CHROME_BROWSER_DRIVE_DRIVE_NOTIFICATION_MANAGER_FACTORY_H_
6 #define CHROME_BROWSER_DRIVE_DRIVE_NOTIFICATION_MANAGER_FACTORY_H_ 6 #define CHROME_BROWSER_DRIVE_DRIVE_NOTIFICATION_MANAGER_FACTORY_H_
7 7
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "components/browser_context_keyed_service/browser_context_keyed_service _factory.h" 9 #include "components/browser_context_keyed_service/browser_context_keyed_service _factory.h"
10 10
11 class Profile; 11 namespace content {
12 class BrowserContext;
13 }
12 14
13 namespace drive { 15 namespace drive {
14 16
15 class DriveNotificationManager; 17 class DriveNotificationManager;
16 18
17 // Singleton that owns all DriveNotificationManager and associates them with 19 // Singleton that owns all DriveNotificationManager and associates them with
18 // profiles. 20 // browser contexts.
19 class DriveNotificationManagerFactory 21 class DriveNotificationManagerFactory
20 : public BrowserContextKeyedServiceFactory { 22 : public BrowserContextKeyedServiceFactory {
21 public: 23 public:
22 static DriveNotificationManager* GetForProfile(Profile* profile); 24 static DriveNotificationManager* GetForBrowserContext(
25 content::BrowserContext* context);
23 26
24 static DriveNotificationManagerFactory* GetInstance(); 27 static DriveNotificationManagerFactory* GetInstance();
25 28
26 private: 29 private:
27 friend struct DefaultSingletonTraits<DriveNotificationManagerFactory>; 30 friend struct DefaultSingletonTraits<DriveNotificationManagerFactory>;
28 31
29 DriveNotificationManagerFactory(); 32 DriveNotificationManagerFactory();
30 virtual ~DriveNotificationManagerFactory(); 33 virtual ~DriveNotificationManagerFactory();
31 34
32 // BrowserContextKeyedServiceFactory implementation. 35 // BrowserContextKeyedServiceFactory implementation.
33 virtual BrowserContextKeyedService* BuildServiceInstanceFor( 36 virtual BrowserContextKeyedService* BuildServiceInstanceFor(
34 content::BrowserContext* profile) const OVERRIDE; 37 content::BrowserContext* context) const OVERRIDE;
35 }; 38 };
36 39
37 } // namespace drive 40 } // namespace drive
38 41
39 #endif // CHROME_BROWSER_DRIVE_DRIVE_NOTIFICATION_MANAGER_FACTORY_H_ 42 #endif // CHROME_BROWSER_DRIVE_DRIVE_NOTIFICATION_MANAGER_FACTORY_H_
OLDNEW
« no previous file with comments | « chrome/browser/drive/drive_notification_manager.cc ('k') | chrome/browser/drive/drive_notification_manager_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698