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

Side by Side Diff: chrome/browser/extensions/api/preference/preference_api_factory.cc

Issue 11617017: Removed dead code from chrome/browser/extensions/api/preference Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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
« no previous file with comments | « chrome/browser/extensions/api/preference/preference_api_factory.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "chrome/browser/extensions/api/preference/preference_api_factory.h" 5 #include "chrome/browser/extensions/api/preference/preference_api_factory.h"
6 6
7 #include "chrome/browser/extensions/api/preference/preference_api.h" 7 #include "chrome/browser/extensions/api/preference/preference_api.h"
8 #include "chrome/browser/extensions/extension_system_factory.h" 8 #include "chrome/browser/extensions/extension_system_factory.h"
9 #include "chrome/browser/profiles/profile_dependency_manager.h" 9 #include "chrome/browser/profiles/profile_dependency_manager.h"
10 10
11 namespace extensions { 11 namespace extensions {
12 12
13 // static 13 // static
14 PreferenceAPI* PreferenceAPIFactory::GetForProfile(Profile* profile) {
15 return static_cast<PreferenceAPI*>(
16 GetInstance()->GetServiceForProfile(profile, true));
17 }
18
19 // static
20 PreferenceAPIFactory* PreferenceAPIFactory::GetInstance() { 14 PreferenceAPIFactory* PreferenceAPIFactory::GetInstance() {
21 return Singleton<PreferenceAPIFactory>::get(); 15 return Singleton<PreferenceAPIFactory>::get();
22 } 16 }
23 17
24 PreferenceAPIFactory::PreferenceAPIFactory() 18 PreferenceAPIFactory::PreferenceAPIFactory()
25 : ProfileKeyedServiceFactory("PreferenceAPI", 19 : ProfileKeyedServiceFactory("PreferenceAPI",
26 ProfileDependencyManager::GetInstance()) { 20 ProfileDependencyManager::GetInstance()) {
27 DependsOn(ExtensionSystemFactory::GetInstance()); 21 DependsOn(ExtensionSystemFactory::GetInstance());
28 } 22 }
29 23
30 PreferenceAPIFactory::~PreferenceAPIFactory() { 24 PreferenceAPIFactory::~PreferenceAPIFactory() {
31 } 25 }
32 26
33 ProfileKeyedService* PreferenceAPIFactory::BuildServiceInstanceFor( 27 ProfileKeyedService* PreferenceAPIFactory::BuildServiceInstanceFor(
34 Profile* profile) const { 28 Profile* profile) const {
35 return new PreferenceAPI(profile); 29 return new PreferenceAPI(profile);
36 } 30 }
37 31
38 bool PreferenceAPIFactory::ServiceIsCreatedWithProfile() const { 32 bool PreferenceAPIFactory::ServiceIsCreatedWithProfile() const {
39 return true; 33 return true;
40 } 34 }
41 35
42 bool PreferenceAPIFactory::ServiceIsNULLWhileTesting() const { 36 bool PreferenceAPIFactory::ServiceIsNULLWhileTesting() const {
43 return true; 37 return true;
44 } 38 }
45 39
46 } // namespace extensions 40 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/preference/preference_api_factory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698