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