| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/signin/signin_error_controller_factory.h" | 5 #include "chrome/browser/signin/signin_error_controller_factory.h" |
| 6 | 6 |
| 7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
| 8 #include "components/keyed_service/content/browser_context_dependency_manager.h" | 8 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
| 9 | 9 |
| 10 SigninErrorControllerFactory::SigninErrorControllerFactory() | 10 SigninErrorControllerFactory::SigninErrorControllerFactory() |
| 11 : BrowserContextKeyedServiceFactory( | 11 : BrowserContextKeyedServiceFactory( |
| 12 "SigninErrorController", | 12 "SigninErrorController", |
| 13 BrowserContextDependencyManager::GetInstance()) {} | 13 BrowserContextDependencyManager::GetInstance()) {} |
| 14 | 14 |
| 15 SigninErrorControllerFactory::~SigninErrorControllerFactory() {} | 15 SigninErrorControllerFactory::~SigninErrorControllerFactory() {} |
| 16 | 16 |
| 17 // static | 17 // static |
| 18 SigninErrorController* SigninErrorControllerFactory::GetForProfile( | 18 SigninErrorController* SigninErrorControllerFactory::GetForProfile( |
| 19 Profile* profile) { | 19 Profile* profile) { |
| 20 return static_cast<SigninErrorController*>( | 20 return static_cast<SigninErrorController*>( |
| 21 GetInstance()->GetServiceForBrowserContext(profile, true)); | 21 GetInstance()->GetServiceForBrowserContext(profile, true)); |
| 22 } | 22 } |
| 23 | 23 |
| 24 // static | 24 // static |
| 25 SigninErrorControllerFactory* SigninErrorControllerFactory::GetInstance() { | 25 SigninErrorControllerFactory* SigninErrorControllerFactory::GetInstance() { |
| 26 return Singleton<SigninErrorControllerFactory>::get(); | 26 return base::Singleton<SigninErrorControllerFactory>::get(); |
| 27 } | 27 } |
| 28 | 28 |
| 29 KeyedService* SigninErrorControllerFactory::BuildServiceInstanceFor( | 29 KeyedService* SigninErrorControllerFactory::BuildServiceInstanceFor( |
| 30 content::BrowserContext* context) const { | 30 content::BrowserContext* context) const { |
| 31 return new SigninErrorController(); | 31 return new SigninErrorController(); |
| 32 } | 32 } |
| OLD | NEW |