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_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" |
(...skipping 24 matching lines...) Expand all Loading... |
35 DependsOn(GlobalErrorServiceFactory::GetInstance()); | 35 DependsOn(GlobalErrorServiceFactory::GetInstance()); |
36 #if defined(ENABLE_THEMES) | 36 #if defined(ENABLE_THEMES) |
37 DependsOn(ThemeServiceFactory::GetInstance()); | 37 DependsOn(ThemeServiceFactory::GetInstance()); |
38 #endif | 38 #endif |
39 } | 39 } |
40 | 40 |
41 ExtensionSystemSharedFactory::~ExtensionSystemSharedFactory() { | 41 ExtensionSystemSharedFactory::~ExtensionSystemSharedFactory() { |
42 } | 42 } |
43 | 43 |
44 ProfileKeyedService* ExtensionSystemSharedFactory::BuildServiceInstanceFor( | 44 ProfileKeyedService* ExtensionSystemSharedFactory::BuildServiceInstanceFor( |
45 Profile* profile) const { | 45 content::BrowserContext* profile) const { |
46 return new ExtensionSystemImpl::Shared(profile); | 46 return new ExtensionSystemImpl::Shared(static_cast<Profile*>(profile)); |
47 } | 47 } |
48 | 48 |
49 bool ExtensionSystemSharedFactory::ServiceRedirectedInIncognito() const { | 49 bool ExtensionSystemSharedFactory::ServiceRedirectedInIncognito() const { |
50 return true; | 50 return true; |
51 } | 51 } |
52 | 52 |
53 // ExtensionSystemFactory | 53 // ExtensionSystemFactory |
54 | 54 |
55 // static | 55 // static |
56 ExtensionSystem* ExtensionSystemFactory::GetForProfile(Profile* profile) { | 56 ExtensionSystem* ExtensionSystemFactory::GetForProfile(Profile* profile) { |
(...skipping 10 matching lines...) Expand all Loading... |
67 : ProfileKeyedServiceFactory( | 67 : ProfileKeyedServiceFactory( |
68 "ExtensionSystem", | 68 "ExtensionSystem", |
69 ProfileDependencyManager::GetInstance()) { | 69 ProfileDependencyManager::GetInstance()) { |
70 DependsOn(ExtensionSystemSharedFactory::GetInstance()); | 70 DependsOn(ExtensionSystemSharedFactory::GetInstance()); |
71 } | 71 } |
72 | 72 |
73 ExtensionSystemFactory::~ExtensionSystemFactory() { | 73 ExtensionSystemFactory::~ExtensionSystemFactory() { |
74 } | 74 } |
75 | 75 |
76 ProfileKeyedService* ExtensionSystemFactory::BuildServiceInstanceFor( | 76 ProfileKeyedService* ExtensionSystemFactory::BuildServiceInstanceFor( |
77 Profile* profile) const { | 77 content::BrowserContext* profile) const { |
78 return new ExtensionSystemImpl(profile); | 78 return new ExtensionSystemImpl(static_cast<Profile*>(profile)); |
79 } | 79 } |
80 | 80 |
81 bool ExtensionSystemFactory::ServiceHasOwnInstanceInIncognito() const { | 81 bool ExtensionSystemFactory::ServiceHasOwnInstanceInIncognito() const { |
82 return true; | 82 return true; |
83 } | 83 } |
84 | 84 |
85 bool ExtensionSystemFactory::ServiceIsCreatedWithProfile() const { | 85 bool ExtensionSystemFactory::ServiceIsCreatedWithProfile() const { |
86 return true; | 86 return true; |
87 } | 87 } |
88 | 88 |
89 } // namespace extensions | 89 } // namespace extensions |
OLD | NEW |