Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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. 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "ios/chrome/browser/signin/fake_signin_manager_builder.h" | |
| 6 | |
| 7 #include "components/signin/core/browser/fake_signin_manager.h" | |
| 8 #include "ios/chrome/browser/signin/account_tracker_service_factory.h" | |
| 9 #include "ios/chrome/browser/signin/gaia_cookie_manager_service_factory.h" | |
| 10 #include "ios/chrome/browser/signin/oauth2_token_service_factory.h" | |
| 11 #include "ios/chrome/browser/signin/signin_client_factory.h" | |
| 12 #include "ios/chrome/browser/signin/signin_manager_factory.h" | |
| 13 #include "ios/public/provider/chrome/browser/browser_state/chrome_browser_state. h" | |
| 14 | |
| 15 namespace ios { | |
| 16 | |
| 17 scoped_ptr<KeyedService> BuildFakeSigninManager( | |
| 18 web::BrowserState* browser_state) { | |
| 19 ios::ChromeBrowserState* chrome_browser_state = | |
| 20 ios::ChromeBrowserState::FromBrowserState(browser_state); | |
| 21 SigninManager* manager = new FakeSigninManager( | |
|
sdefresne
2015/07/24 12:38:46
scoped_ptr<SigninManager> manager(new FakeSigninMa
| |
| 22 SigninClientFactory::GetForBrowserState(chrome_browser_state), | |
| 23 OAuth2TokenServiceFactory::GetForBrowserState(chrome_browser_state), | |
| 24 ios::AccountTrackerServiceFactory::GetForBrowserState( | |
| 25 chrome_browser_state), | |
| 26 ios::GaiaCookieManagerServiceFactory::GetForBrowserState( | |
| 27 chrome_browser_state)); | |
| 28 manager->Initialize(nullptr); | |
| 29 ios::SigninManagerFactory::GetInstance() | |
| 30 ->NotifyObserversOfSigninManagerCreationForTesting(manager); | |
| 31 return make_scoped_ptr(manager); | |
|
sdefresne
2015/07/24 12:38:46
return manager.Pass();
| |
| 32 } | |
| 33 | |
| 34 } // namespace ios | |
| OLD | NEW |