Only grant permissions to new extensions from sync if they have the expected version
[chromium-blink-merge.git] / chrome / browser / signin / fake_account_fetcher_service_builder.cc
blobb40f18dd66033ca373c23cc7eb851676471bdc0c
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"
14 // static
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),
22 nullptr);
23 return scoped_ptr<KeyedService>(service);