Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / signin / account_reconcilor_factory.cc
blobef250e8d127c7a377059923146608ad3b5f5fce4
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
3 // found in the LICENSE file.
5 #include "chrome/browser/signin/account_reconcilor_factory.h"
7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
9 #include "chrome/browser/signin/signin_manager_factory.h"
10 #include "components/browser_context_keyed_service/browser_context_dependency_manager.h"
12 AccountReconcilorFactory::AccountReconcilorFactory()
13 : BrowserContextKeyedServiceFactory(
14 "AccountReconcilor",
15 BrowserContextDependencyManager::GetInstance()) {
16 DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance());
17 DependsOn(SigninManagerFactory::GetInstance());
20 AccountReconcilorFactory::~AccountReconcilorFactory() {}
22 // static
23 AccountReconcilor* AccountReconcilorFactory::GetForProfile(
24 Profile* profile) {
25 return static_cast<AccountReconcilor*>(
26 GetInstance()->GetServiceForBrowserContext(profile, true));
29 // static
30 AccountReconcilorFactory* AccountReconcilorFactory::GetInstance() {
31 return Singleton<AccountReconcilorFactory>::get();
34 BrowserContextKeyedService* AccountReconcilorFactory::BuildServiceInstanceFor(
35 content::BrowserContext* context) const {
36 return new AccountReconcilor(static_cast<Profile*>(context));
39 void AccountReconcilorFactory::RegisterProfilePrefs(
40 user_prefs::PrefRegistrySyncable* registry) {