Chromium Code Reviews| 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/incognito_helpers.h" | |
| 10 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
| 11 #include "chrome/browser/profiles/profile_dependency_manager.h" | 12 #include "chrome/browser/profiles/profile_dependency_manager.h" |
| 12 #include "chrome/browser/themes/theme_service_factory.h" | 13 #include "chrome/browser/themes/theme_service_factory.h" |
| 13 #include "chrome/browser/ui/global_error/global_error_service_factory.h" | 14 #include "chrome/browser/ui/global_error/global_error_service_factory.h" |
| 14 | 15 |
| 15 namespace extensions { | 16 namespace extensions { |
| 16 | 17 |
| 17 // ExtensionSystemSharedFactory | 18 // ExtensionSystemSharedFactory |
| 18 | 19 |
| 19 // static | 20 // static |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 39 } | 40 } |
| 40 | 41 |
| 41 ExtensionSystemSharedFactory::~ExtensionSystemSharedFactory() { | 42 ExtensionSystemSharedFactory::~ExtensionSystemSharedFactory() { |
| 42 } | 43 } |
| 43 | 44 |
| 44 ProfileKeyedService* ExtensionSystemSharedFactory::BuildServiceInstanceFor( | 45 ProfileKeyedService* ExtensionSystemSharedFactory::BuildServiceInstanceFor( |
| 45 content::BrowserContext* profile) const { | 46 content::BrowserContext* profile) const { |
| 46 return new ExtensionSystemImpl::Shared(static_cast<Profile*>(profile)); | 47 return new ExtensionSystemImpl::Shared(static_cast<Profile*>(profile)); |
| 47 } | 48 } |
| 48 | 49 |
| 49 bool ExtensionSystemSharedFactory::ServiceRedirectedInIncognito() const { | 50 content::BrowserContext* ExtensionSystemSharedFactory::GetBrowserContextToUse( |
| 50 return true; | 51 content::BrowserContext* context) const { |
| 52 return chrome::GetBrowserContextRedirectedInIncognito(context); | |
| 51 } | 53 } |
| 52 | 54 |
| 53 // ExtensionSystemFactory | 55 // ExtensionSystemFactory |
| 54 | 56 |
| 55 // static | 57 // static |
| 56 ExtensionSystem* ExtensionSystemFactory::GetForProfile(Profile* profile) { | 58 ExtensionSystem* ExtensionSystemFactory::GetForProfile(Profile* profile) { |
| 57 return static_cast<ExtensionSystem*>( | 59 return static_cast<ExtensionSystem*>( |
| 58 GetInstance()->GetServiceForProfile(profile, true)); | 60 GetInstance()->GetServiceForProfile(profile, true)); |
| 59 } | 61 } |
| 60 | 62 |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 71 } | 73 } |
| 72 | 74 |
| 73 ExtensionSystemFactory::~ExtensionSystemFactory() { | 75 ExtensionSystemFactory::~ExtensionSystemFactory() { |
| 74 } | 76 } |
| 75 | 77 |
| 76 ProfileKeyedService* ExtensionSystemFactory::BuildServiceInstanceFor( | 78 ProfileKeyedService* ExtensionSystemFactory::BuildServiceInstanceFor( |
| 77 content::BrowserContext* profile) const { | 79 content::BrowserContext* profile) const { |
| 78 return new ExtensionSystemImpl(static_cast<Profile*>(profile)); | 80 return new ExtensionSystemImpl(static_cast<Profile*>(profile)); |
| 79 } | 81 } |
| 80 | 82 |
| 81 bool ExtensionSystemFactory::ServiceHasOwnInstanceInIncognito() const { | 83 content::BrowserContext* ExtensionSystemSharedFactory::GetBrowserContextToUse( |
|
Jói
2013/05/02 17:10:52
ExtensionSystemSharedFactory -> ExtensionSystemFac
Paweł Hajdan Jr.
2013/05/03 17:34:41
Done.
| |
| 82 return true; | 84 content::BrowserContext* context) const { |
| 85 return chrome::GetBrowserContextOwnInstanceInIncognito(context); | |
| 83 } | 86 } |
| 84 | 87 |
| 85 bool ExtensionSystemFactory::ServiceIsCreatedWithProfile() const { | 88 bool ExtensionSystemFactory::ServiceIsCreatedWithProfile() const { |
| 86 return true; | 89 return true; |
| 87 } | 90 } |
| 88 | 91 |
| 89 } // namespace extensions | 92 } // namespace extensions |
| OLD | NEW |