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/fake_account_fetcher_service_builder.h" | 5 #include "chrome/browser/signin/fake_account_fetcher_service_builder.h" |
6 | 6 |
7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
8 #include "chrome/browser/signin/account_tracker_service_factory.h" | 8 #include "chrome/browser/signin/account_tracker_service_factory.h" |
9 #include "chrome/browser/signin/chrome_signin_client_factory.h" | 9 #include "chrome/browser/signin/chrome_signin_client_factory.h" |
10 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 10 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
11 #include "components/signin/core/browser/fake_account_fetcher_service.h" | 11 #include "components/signin/core/browser/fake_account_fetcher_service.h" |
12 #include "components/signin/core/browser/profile_oauth2_token_service.h" | 12 #include "components/signin/core/browser/profile_oauth2_token_service.h" |
13 | 13 |
14 // static | 14 // static |
15 scoped_ptr<KeyedService> FakeAccountFetcherServiceBuilder::BuildForTests( | 15 scoped_ptr<KeyedService> FakeAccountFetcherServiceBuilder::BuildForTests( |
16 content::BrowserContext* context) { | 16 content::BrowserContext* context) { |
17 FakeAccountFetcherService* service = new FakeAccountFetcherService(); | 17 FakeAccountFetcherService* service = new FakeAccountFetcherService(); |
18 Profile* profile = Profile::FromBrowserContext(context); | 18 Profile* profile = Profile::FromBrowserContext(context); |
19 service->Initialize(ChromeSigninClientFactory::GetForProfile(profile), | 19 service->Initialize(ChromeSigninClientFactory::GetForProfile(profile), |
20 ProfileOAuth2TokenServiceFactory::GetForProfile(profile), | 20 ProfileOAuth2TokenServiceFactory::GetForProfile(profile), |
21 AccountTrackerServiceFactory::GetForProfile(profile), | 21 AccountTrackerServiceFactory::GetForProfile(profile)); |
22 nullptr); | |
23 return scoped_ptr<KeyedService>(service); | 22 return scoped_ptr<KeyedService>(service); |
24 } | 23 } |
OLD | NEW |