Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: chrome/browser/cryptauth/chrome_cryptauth_service_factory.cc

Issue 2819713002: Create TetherService, a TetherAllowed pref, and use DependencyManager for RegisterProfilePrefs call… (Closed)
Patch Set: Create an IsEnabled method on TetherService. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/cryptauth/chrome_cryptauth_service_factory.h ('k') | chrome/browser/prefs/browser_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698