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

Side by Side Diff: chrome/browser/google_apis/drive_notification_manager_factory.cc

Issue 14030004: Added DriveNotificationManagerFactory so DriveNotificationManager is a singleton and can be called … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Satorux #1 review, added class comment and updated DEPS Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/google_apis/drive_notification_manager_factory.h"
6
7 #include "chrome/browser/google_apis/drive_notification_manager.h"
8 #include "chrome/browser/profiles/profile_dependency_manager.h"
9
10 namespace google_apis {
11
12 // static
13 DriveNotificationManager*
14 DriveNotificationManagerFactory::GetForProfile(Profile* profile) {
15 return static_cast<DriveNotificationManager*>(
16 GetInstance()->GetServiceForProfile(profile, true));
17 }
18
19 // static
20 DriveNotificationManagerFactory*
21 DriveNotificationManagerFactory::GetInstance() {
22 return Singleton<DriveNotificationManagerFactory>::get();
23 }
24
25 DriveNotificationManagerFactory::DriveNotificationManagerFactory()
26 : ProfileKeyedServiceFactory("DriveNotificationManager",
27 ProfileDependencyManager::GetInstance()) {}
tzik 2013/04/11 05:48:17 I think the DriveNotificationManager depends some
calvinlo 2013/04/11 06:47:33 Done.
28
29 DriveNotificationManagerFactory::~DriveNotificationManagerFactory() {}
30
31 ProfileKeyedService* DriveNotificationManagerFactory::BuildServiceInstanceFor(
32 Profile* profile) const {
33 return new DriveNotificationManager(profile);
34 }
35
36 } // namespace google_apis
OLDNEW
« no previous file with comments | « chrome/browser/google_apis/drive_notification_manager_factory.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698