OLD | NEW |
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_message_service.h" | 7 #include "chrome/browser/extensions/extension_message_service.h" |
8 #include "chrome/browser/extensions/extension_prefs.h" | 8 #include "chrome/browser/extensions/extension_prefs.h" |
9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
10 #include "chrome/browser/extensions/extension_system.h" | 10 #include "chrome/browser/extensions/extension_system.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 // static | 26 // static |
27 ExtensionSystemSharedFactory* ExtensionSystemSharedFactory::GetInstance() { | 27 ExtensionSystemSharedFactory* ExtensionSystemSharedFactory::GetInstance() { |
28 return Singleton<ExtensionSystemSharedFactory>::get(); | 28 return Singleton<ExtensionSystemSharedFactory>::get(); |
29 } | 29 } |
30 | 30 |
31 ExtensionSystemSharedFactory::ExtensionSystemSharedFactory() | 31 ExtensionSystemSharedFactory::ExtensionSystemSharedFactory() |
32 : ProfileKeyedServiceFactory( | 32 : ProfileKeyedServiceFactory( |
33 "ExtensionSystemShared", | 33 "ExtensionSystemShared", |
34 ProfileDependencyManager::GetInstance()) { | 34 ProfileDependencyManager::GetInstance()) { |
35 DependsOn(GlobalErrorServiceFactory::GetInstance()); | 35 DependsOn(GlobalErrorServiceFactory::GetInstance()); |
| 36 #if defined(ENABLE_THEMES) |
36 DependsOn(ThemeServiceFactory::GetInstance()); | 37 DependsOn(ThemeServiceFactory::GetInstance()); |
| 38 #endif |
| 39 #if defined(ENABLE_PROTECTOR_SERVICE) |
37 // ProtectorService should be destroyed after us. | 40 // ProtectorService should be destroyed after us. |
38 DependsOn(protector::ProtectorServiceFactory::GetInstance()); | 41 DependsOn(protector::ProtectorServiceFactory::GetInstance()); |
| 42 #endif |
39 } | 43 } |
40 | 44 |
41 ExtensionSystemSharedFactory::~ExtensionSystemSharedFactory() { | 45 ExtensionSystemSharedFactory::~ExtensionSystemSharedFactory() { |
42 } | 46 } |
43 | 47 |
44 ProfileKeyedService* ExtensionSystemSharedFactory::BuildServiceInstanceFor( | 48 ProfileKeyedService* ExtensionSystemSharedFactory::BuildServiceInstanceFor( |
45 Profile* profile) const { | 49 Profile* profile) const { |
46 return new ExtensionSystemImpl::Shared(profile); | 50 return new ExtensionSystemImpl::Shared(profile); |
47 } | 51 } |
48 | 52 |
(...skipping 29 matching lines...) Expand all Loading... |
78 return new ExtensionSystemImpl(profile); | 82 return new ExtensionSystemImpl(profile); |
79 } | 83 } |
80 | 84 |
81 bool ExtensionSystemFactory::ServiceHasOwnInstanceInIncognito() { | 85 bool ExtensionSystemFactory::ServiceHasOwnInstanceInIncognito() { |
82 return true; | 86 return true; |
83 } | 87 } |
84 | 88 |
85 bool ExtensionSystemFactory::ServiceIsCreatedWithProfile() { | 89 bool ExtensionSystemFactory::ServiceIsCreatedWithProfile() { |
86 return true; | 90 return true; |
87 } | 91 } |
OLD | NEW |