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

Side by Side Diff: chrome/browser/extensions/install_tracker_factory.cc

Issue 12298015: Change NotifyAppList*() functions into observers on a ProfileKeyedService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 7 years, 10 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 (c) 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/extensions/install_tracker_factory.h"
6
7 #include "chrome/browser/extensions/install_tracker.h"
8 #include "chrome/browser/profiles/profile_dependency_manager.h"
9
10 namespace extensions {
11
12 // static
13 InstallTracker* InstallTrackerFactory::GetForProfile(Profile* profile) {
14 return static_cast<InstallTracker*>(
15 GetInstance()->GetServiceForProfile(profile, true));
16 }
17
18 // static
19 void InstallTrackerFactory::ResetForProfile(Profile* profile) {
20 InstallTrackerFactory* factory = GetInstance();
21 factory->ProfileShutdown(profile);
22 factory->ProfileDestroyed(profile);
23 }
24
25 InstallTrackerFactory* InstallTrackerFactory::GetInstance() {
26 return Singleton<InstallTrackerFactory>::get();
27 }
28
29 InstallTrackerFactory::InstallTrackerFactory()
30 : ProfileKeyedServiceFactory("InstallTracker",
31 ProfileDependencyManager::GetInstance()) {
32 }
33
34 InstallTrackerFactory::~InstallTrackerFactory() {
35 }
36
37 ProfileKeyedService* InstallTrackerFactory::BuildServiceInstanceFor(
38 Profile* profile) const {
39 return new InstallTracker(profile);
40 }
41
42 bool InstallTrackerFactory::ServiceIsCreatedWithProfile() const {
43 return true;
xiyuan 2013/02/21 06:33:17 Why InstallTracker needs to be created with profil
koz (OOO until 15th September) 2013/02/25 02:39:28 Yes, true. Removed.
44 }
45
46 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698