OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 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/ui/global_error_service_factory.h" |
| 6 |
| 7 #include "chrome/browser/profiles/profile_dependency_manager.h" |
| 8 #include "chrome/browser/ui/global_error_service.h" |
| 9 |
| 10 // static |
| 11 GlobalErrorService* GlobalErrorServiceFactory::GetForProfile(Profile* profile) { |
| 12 return static_cast<GlobalErrorService*>( |
| 13 GetInstance()->GetServiceForProfile(profile, true)); |
| 14 } |
| 15 |
| 16 // static |
| 17 GlobalErrorServiceFactory* GlobalErrorServiceFactory::GetInstance() { |
| 18 return Singleton<GlobalErrorServiceFactory>::get(); |
| 19 } |
| 20 |
| 21 GlobalErrorServiceFactory::GlobalErrorServiceFactory() |
| 22 : ProfileKeyedServiceFactory( |
| 23 ProfileDependencyManager::GetInstance()) { |
| 24 } |
| 25 |
| 26 GlobalErrorServiceFactory::~GlobalErrorServiceFactory() { |
| 27 } |
| 28 |
| 29 ProfileKeyedService* GlobalErrorServiceFactory::BuildServiceInstanceFor( |
| 30 Profile* profile) const { |
| 31 return new GlobalErrorService(); |
| 32 } |
| 33 |
| 34 bool GlobalErrorServiceFactory::ServiceRedirectedInIncognito() { |
| 35 return true; |
| 36 } |
OLD | NEW |