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

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: fix mac Created 7 years, 9 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 "base/memory/singleton.h"
8 #include "chrome/browser/extensions/install_tracker.h"
9 #include "chrome/browser/profiles/profile_dependency_manager.h"
10
11 namespace extensions {
12
13 // static
14 InstallTracker* InstallTrackerFactory::GetForProfile(Profile* profile) {
15 return static_cast<InstallTracker*>(
16 GetInstance()->GetServiceForProfile(profile, true));
17 }
18
19 InstallTrackerFactory* InstallTrackerFactory::GetInstance() {
20 return Singleton<InstallTrackerFactory>::get();
21 }
22
23 InstallTrackerFactory::InstallTrackerFactory()
24 : ProfileKeyedServiceFactory("InstallTracker",
25 ProfileDependencyManager::GetInstance()) {
26 }
27
28 InstallTrackerFactory::~InstallTrackerFactory() {
29 }
30
31 ProfileKeyedService* InstallTrackerFactory::BuildServiceInstanceFor(
32 Profile* profile) const {
33 return new InstallTracker();
34 }
35
36 bool InstallTrackerFactory::ServiceRedirectedInIncognito() const {
37 // The installs themselves are routed to the non-incognito profile and so
38 // should the install progress.
39 return true;
40 }
41
42 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/install_tracker_factory.h ('k') | chrome/browser/profiles/profile_dependency_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698