| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #import "ios/chrome/browser/signin/authentication_service_factory.h" | 5 #import "ios/chrome/browser/signin/authentication_service_factory.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 std::unique_ptr<KeyedService> | 51 std::unique_ptr<KeyedService> |
| 52 AuthenticationServiceFactory::BuildServiceInstanceFor( | 52 AuthenticationServiceFactory::BuildServiceInstanceFor( |
| 53 web::BrowserState* context) const { | 53 web::BrowserState* context) const { |
| 54 ios::ChromeBrowserState* browser_state = | 54 ios::ChromeBrowserState* browser_state = |
| 55 ios::ChromeBrowserState::FromBrowserState(context); | 55 ios::ChromeBrowserState::FromBrowserState(context); |
| 56 std::unique_ptr<AuthenticationService> service(new AuthenticationService( | 56 std::unique_ptr<AuthenticationService> service(new AuthenticationService( |
| 57 browser_state, | 57 browser_state, |
| 58 OAuth2TokenServiceFactory::GetForBrowserState(browser_state), | 58 OAuth2TokenServiceFactory::GetForBrowserState(browser_state), |
| 59 SyncSetupServiceFactory::GetForBrowserState(browser_state))); | 59 SyncSetupServiceFactory::GetForBrowserState(browser_state))); |
| 60 service->Initialize(); | 60 service->Initialize(); |
| 61 // TODO(crbug.com/703565): remove std::move() once Xcode 9.0+ is required. |
| 61 return std::move(service); | 62 return std::move(service); |
| 62 } | 63 } |
| 63 | 64 |
| 64 void AuthenticationServiceFactory::RegisterBrowserStatePrefs( | 65 void AuthenticationServiceFactory::RegisterBrowserStatePrefs( |
| 65 user_prefs::PrefRegistrySyncable* registry) { | 66 user_prefs::PrefRegistrySyncable* registry) { |
| 66 AuthenticationService::RegisterPrefs(registry); | 67 AuthenticationService::RegisterPrefs(registry); |
| 67 } | 68 } |
| OLD | NEW |