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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 } | 44 } |
45 | 45 |
46 ExtensionSystemSharedFactory::~ExtensionSystemSharedFactory() { | 46 ExtensionSystemSharedFactory::~ExtensionSystemSharedFactory() { |
47 } | 47 } |
48 | 48 |
49 ProfileKeyedService* ExtensionSystemSharedFactory::BuildServiceInstanceFor( | 49 ProfileKeyedService* ExtensionSystemSharedFactory::BuildServiceInstanceFor( |
50 Profile* profile) const { | 50 Profile* profile) const { |
51 return new ExtensionSystemImpl::Shared(profile); | 51 return new ExtensionSystemImpl::Shared(profile); |
52 } | 52 } |
53 | 53 |
54 bool ExtensionSystemSharedFactory::ServiceRedirectedInIncognito() { | 54 bool ExtensionSystemSharedFactory::ServiceRedirectedInIncognito() const { |
55 return true; | 55 return true; |
56 } | 56 } |
57 | 57 |
58 // ExtensionSystemFactory | 58 // ExtensionSystemFactory |
59 | 59 |
60 // static | 60 // static |
61 ExtensionSystem* ExtensionSystemFactory::GetForProfile(Profile* profile) { | 61 ExtensionSystem* ExtensionSystemFactory::GetForProfile(Profile* profile) { |
62 return static_cast<ExtensionSystem*>( | 62 return static_cast<ExtensionSystem*>( |
63 GetInstance()->GetServiceForProfile(profile, true)); | 63 GetInstance()->GetServiceForProfile(profile, true)); |
64 } | 64 } |
(...skipping 11 matching lines...) Expand all Loading... |
76 } | 76 } |
77 | 77 |
78 ExtensionSystemFactory::~ExtensionSystemFactory() { | 78 ExtensionSystemFactory::~ExtensionSystemFactory() { |
79 } | 79 } |
80 | 80 |
81 ProfileKeyedService* ExtensionSystemFactory::BuildServiceInstanceFor( | 81 ProfileKeyedService* ExtensionSystemFactory::BuildServiceInstanceFor( |
82 Profile* profile) const { | 82 Profile* profile) const { |
83 return new ExtensionSystemImpl(profile); | 83 return new ExtensionSystemImpl(profile); |
84 } | 84 } |
85 | 85 |
86 bool ExtensionSystemFactory::ServiceHasOwnInstanceInIncognito() { | 86 bool ExtensionSystemFactory::ServiceHasOwnInstanceInIncognito() const { |
87 return true; | 87 return true; |
88 } | 88 } |
89 | 89 |
90 bool ExtensionSystemFactory::ServiceIsCreatedWithProfile() { | 90 bool ExtensionSystemFactory::ServiceIsCreatedWithProfile() const { |
91 return true; | 91 return true; |
92 } | 92 } |
93 | 93 |
94 } // namespace extensions | 94 } // namespace extensions |
OLD | NEW |