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

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

Issue 11493003: Remove the protector service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix implicit ExtensionSystem -> TemplateURLService dependency 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
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/extension_system_factory.h" 5 #include "chrome/browser/extensions/extension_system_factory.h"
6 6
7 #include "chrome/browser/extensions/extension_prefs.h" 7 #include "chrome/browser/extensions/extension_prefs.h"
8 #include "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/extensions/extension_system.h" 9 #include "chrome/browser/extensions/extension_system.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/profiles/profile_dependency_manager.h" 11 #include "chrome/browser/profiles/profile_dependency_manager.h"
12 #include "chrome/browser/protector/protector_service_factory.h" 12 #include "chrome/browser/search_engines/template_url_service_factory.h"
13 #include "chrome/browser/themes/theme_service_factory.h" 13 #include "chrome/browser/themes/theme_service_factory.h"
14 #include "chrome/browser/ui/global_error/global_error_service_factory.h" 14 #include "chrome/browser/ui/global_error/global_error_service_factory.h"
15 15
16 namespace extensions { 16 namespace extensions {
17 17
18 // ExtensionSystemSharedFactory 18 // ExtensionSystemSharedFactory
19 19
20 // static 20 // static
21 ExtensionSystemImpl::Shared* 21 ExtensionSystemImpl::Shared*
22 ExtensionSystemSharedFactory::GetForProfile(Profile* profile) { 22 ExtensionSystemSharedFactory::GetForProfile(Profile* profile) {
23 return static_cast<ExtensionSystemImpl::Shared*>( 23 return static_cast<ExtensionSystemImpl::Shared*>(
24 GetInstance()->GetServiceForProfile(profile, true)); 24 GetInstance()->GetServiceForProfile(profile, true));
25 } 25 }
26 26
27 // static 27 // static
28 ExtensionSystemSharedFactory* ExtensionSystemSharedFactory::GetInstance() { 28 ExtensionSystemSharedFactory* ExtensionSystemSharedFactory::GetInstance() {
29 return Singleton<ExtensionSystemSharedFactory>::get(); 29 return Singleton<ExtensionSystemSharedFactory>::get();
30 } 30 }
31 31
32 ExtensionSystemSharedFactory::ExtensionSystemSharedFactory() 32 ExtensionSystemSharedFactory::ExtensionSystemSharedFactory()
33 : ProfileKeyedServiceFactory( 33 : ProfileKeyedServiceFactory(
34 "ExtensionSystemShared", 34 "ExtensionSystemShared",
35 ProfileDependencyManager::GetInstance()) { 35 ProfileDependencyManager::GetInstance()) {
36 DependsOn(GlobalErrorServiceFactory::GetInstance()); 36 DependsOn(GlobalErrorServiceFactory::GetInstance());
37 #if defined(ENABLE_THEMES) 37 #if defined(ENABLE_THEMES)
38 DependsOn(ThemeServiceFactory::GetInstance()); 38 DependsOn(ThemeServiceFactory::GetInstance());
39 #endif 39 #endif
40 #if defined(ENABLE_PROTECTOR_SERVICE) 40 DependsOn(TemplateURLServiceFactory::GetInstance());
41 // ProtectorService should be destroyed after us.
42 DependsOn(protector::ProtectorServiceFactory::GetInstance());
43 #endif
44 } 41 }
45 42
46 ExtensionSystemSharedFactory::~ExtensionSystemSharedFactory() { 43 ExtensionSystemSharedFactory::~ExtensionSystemSharedFactory() {
47 } 44 }
48 45
49 ProfileKeyedService* ExtensionSystemSharedFactory::BuildServiceInstanceFor( 46 ProfileKeyedService* ExtensionSystemSharedFactory::BuildServiceInstanceFor(
50 Profile* profile) const { 47 Profile* profile) const {
51 return new ExtensionSystemImpl::Shared(profile); 48 return new ExtensionSystemImpl::Shared(profile);
52 } 49 }
53 50
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 82
86 bool ExtensionSystemFactory::ServiceHasOwnInstanceInIncognito() const { 83 bool ExtensionSystemFactory::ServiceHasOwnInstanceInIncognito() const {
87 return true; 84 return true;
88 } 85 }
89 86
90 bool ExtensionSystemFactory::ServiceIsCreatedWithProfile() const { 87 bool ExtensionSystemFactory::ServiceIsCreatedWithProfile() const {
91 return true; 88 return true;
92 } 89 }
93 90
94 } // namespace extensions 91 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.cc ('k') | chrome/browser/prefs/browser_prefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698