Revert "Fix broken channel icon in chrome://help on CrOS" and try again
[chromium-blink-merge.git] / ios / chrome / browser / signin / signin_error_controller_factory.cc
blob201e81e8e83c28a9b4a14315a88cce9dd9be9cda
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 "ios/chrome/browser/signin/signin_error_controller_factory.h"
7 #include "base/memory/singleton.h"
8 #include "components/keyed_service/core/service_access_type.h"
9 #include "components/keyed_service/ios/browser_state_dependency_manager.h"
10 #include "components/signin/core/browser/signin_error_controller.h"
11 #include "ios/public/provider/chrome/browser/browser_state/chrome_browser_state.h"
13 namespace ios {
15 // static
16 SigninErrorController* SigninErrorControllerFactory::GetForBrowserState(
17 ios::ChromeBrowserState* browser_state) {
18 return static_cast<SigninErrorController*>(
19 GetInstance()->GetServiceForBrowserState(browser_state, true));
22 // static
23 SigninErrorControllerFactory* SigninErrorControllerFactory::GetInstance() {
24 return Singleton<SigninErrorControllerFactory>::get();
27 SigninErrorControllerFactory::SigninErrorControllerFactory()
28 : BrowserStateKeyedServiceFactory(
29 "SigninErrorController",
30 BrowserStateDependencyManager::GetInstance()) {
33 SigninErrorControllerFactory::~SigninErrorControllerFactory() {
36 scoped_ptr<KeyedService> SigninErrorControllerFactory::BuildServiceInstanceFor(
37 web::BrowserState* context) const {
38 return make_scoped_ptr(new SigninErrorController);
41 } // namespace ios