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

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: respond to comments 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 InstallTrackerFactory* InstallTrackerFactory::GetInstance() {
19 return Singleton<InstallTrackerFactory>::get();
20 }
21
22 InstallTrackerFactory::InstallTrackerFactory()
23 : ProfileKeyedServiceFactory("InstallTracker",
24 ProfileDependencyManager::GetInstance()) {
25 }
26
27 InstallTrackerFactory::~InstallTrackerFactory() {
28 }
29
30 ProfileKeyedService* InstallTrackerFactory::BuildServiceInstanceFor(
31 Profile* profile) const {
32 return new InstallTracker();
33 }
34
35 bool InstallTrackerFactory::ServiceRedirectedInIncognito() const {
36 // The installs themselves are routed to the non-incognito profile and so
37 // should the install progress.
38 return true;
39 }
40
41 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698