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
3 // found in the LICENSE file.
5 #include "chrome/browser/signin/signin_error_controller_factory.h"
7 #include "chrome/browser/profiles/profile.h"
8 #include "components/keyed_service/content/browser_context_dependency_manager.h"
10 SigninErrorControllerFactory::SigninErrorControllerFactory()
11 : BrowserContextKeyedServiceFactory(
12 "SigninErrorController",
13 BrowserContextDependencyManager::GetInstance()) {}
15 SigninErrorControllerFactory::~SigninErrorControllerFactory() {}
18 SigninErrorController
* SigninErrorControllerFactory::GetForProfile(
20 return static_cast<SigninErrorController
*>(
21 GetInstance()->GetServiceForBrowserContext(profile
, true));
25 SigninErrorControllerFactory
* SigninErrorControllerFactory::GetInstance() {
26 return base::Singleton
<SigninErrorControllerFactory
>::get();
29 KeyedService
* SigninErrorControllerFactory::BuildServiceInstanceFor(
30 content::BrowserContext
* context
) const {
31 return new SigninErrorController();