| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/extensions/platform_app_service_factory.h" | |
| 6 | |
| 7 #include "chrome/browser/profiles/profile_dependency_manager.h" | |
| 8 | |
| 9 namespace extensions { | |
| 10 | |
| 11 // static | |
| 12 PlatformAppService* PlatformAppServiceFactory::GetForProfile( | |
| 13 Profile* profile) { | |
| 14 return static_cast<PlatformAppService*>( | |
| 15 GetInstance()->GetServiceForProfile(profile, true)); | |
| 16 } | |
| 17 | |
| 18 PlatformAppServiceFactory* PlatformAppServiceFactory::GetInstance() { | |
| 19 return Singleton<PlatformAppServiceFactory>::get(); | |
| 20 } | |
| 21 | |
| 22 PlatformAppServiceFactory::PlatformAppServiceFactory() | |
| 23 : ProfileKeyedServiceFactory("PlatformAppService", | |
| 24 ProfileDependencyManager::GetInstance()) { | |
| 25 } | |
| 26 | |
| 27 PlatformAppServiceFactory::~PlatformAppServiceFactory() { | |
| 28 } | |
| 29 | |
| 30 ProfileKeyedService* PlatformAppServiceFactory::BuildServiceInstanceFor( | |
| 31 Profile* profile) const { | |
| 32 return new PlatformAppService(profile); | |
| 33 } | |
| 34 | |
| 35 bool PlatformAppServiceFactory::ServiceHasOwnInstanceInIncognito() const { | |
| 36 return true; | |
| 37 } | |
| 38 | |
| 39 bool PlatformAppServiceFactory::ServiceIsCreatedWithProfile() const { | |
| 40 return true; | |
| 41 } | |
| 42 | |
| 43 bool PlatformAppServiceFactory::ServiceIsNULLWhileTesting() const { | |
| 44 return false; | |
| 45 } | |
| 46 | |
| 47 } // namespace extensions | |
| OLD | NEW |