OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/cryptauth/chrome_cryptauth_service_factory.h" | 5 #include "chrome/browser/cryptauth/chrome_cryptauth_service_factory.h" |
6 | 6 |
7 #include "chrome/browser/cryptauth/chrome_cryptauth_service.h" | 7 #include "chrome/browser/cryptauth/chrome_cryptauth_service.h" |
8 #include "chrome/browser/gcm/gcm_profile_service_factory.h" | 8 #include "chrome/browser/gcm/gcm_profile_service_factory.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.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 "chrome/browser/signin/signin_manager_factory.h" | 11 #include "chrome/browser/signin/signin_manager_factory.h" |
12 #include "components/keyed_service/content/browser_context_dependency_manager.h" | 12 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
| 13 #include "components/pref_registry/pref_registry_syncable.h" |
13 | 14 |
14 // static | 15 // static |
15 cryptauth::CryptAuthService* | 16 cryptauth::CryptAuthService* |
16 ChromeCryptAuthServiceFactory::GetForBrowserContext( | 17 ChromeCryptAuthServiceFactory::GetForBrowserContext( |
17 content::BrowserContext* context) { | 18 content::BrowserContext* context) { |
18 return static_cast<ChromeCryptAuthService*>( | 19 return static_cast<ChromeCryptAuthService*>( |
19 GetInstance()->GetServiceForBrowserContext(context, true)); | 20 GetInstance()->GetServiceForBrowserContext(context, true)); |
20 } | 21 } |
21 | 22 |
22 // static | 23 // static |
(...skipping 10 matching lines...) Expand all Loading... |
33 DependsOn(gcm::GCMProfileServiceFactory::GetInstance()); | 34 DependsOn(gcm::GCMProfileServiceFactory::GetInstance()); |
34 } | 35 } |
35 | 36 |
36 ChromeCryptAuthServiceFactory::~ChromeCryptAuthServiceFactory() {} | 37 ChromeCryptAuthServiceFactory::~ChromeCryptAuthServiceFactory() {} |
37 | 38 |
38 KeyedService* ChromeCryptAuthServiceFactory::BuildServiceInstanceFor( | 39 KeyedService* ChromeCryptAuthServiceFactory::BuildServiceInstanceFor( |
39 content::BrowserContext* context) const { | 40 content::BrowserContext* context) const { |
40 Profile* profile = Profile::FromBrowserContext(context); | 41 Profile* profile = Profile::FromBrowserContext(context); |
41 return ChromeCryptAuthService::Create(profile).release(); | 42 return ChromeCryptAuthService::Create(profile).release(); |
42 } | 43 } |
| 44 |
| 45 void ChromeCryptAuthServiceFactory::RegisterProfilePrefs( |
| 46 user_prefs::PrefRegistrySyncable* registry) { |
| 47 cryptauth::CryptAuthService::RegisterProfilePrefs(registry); |
| 48 } |
OLD | NEW |