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

Side by Side Diff: chrome/browser/supervised_user/supervised_user_service_factory.cc

Issue 2847803008: ProfileSyncService: Handle null SupervisedUserService (Closed)
Patch Set: break 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/supervised_user/supervised_user_service_factory.h" 5 #include "chrome/browser/supervised_user/supervised_user_service_factory.h"
6 6
7 #include "chrome/browser/profiles/incognito_helpers.h" 7 #include "chrome/browser/profiles/incognito_helpers.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 9 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
10 #include "chrome/browser/supervised_user/supervised_user_service.h" 10 #include "chrome/browser/supervised_user/supervised_user_service.h"
(...skipping 25 matching lines...) Expand all
36 36
37 SupervisedUserServiceFactory::SupervisedUserServiceFactory() 37 SupervisedUserServiceFactory::SupervisedUserServiceFactory()
38 : BrowserContextKeyedServiceFactory( 38 : BrowserContextKeyedServiceFactory(
39 "SupervisedUserService", 39 "SupervisedUserService",
40 BrowserContextDependencyManager::GetInstance()) { 40 BrowserContextDependencyManager::GetInstance()) {
41 #if BUILDFLAG(ENABLE_EXTENSIONS) 41 #if BUILDFLAG(ENABLE_EXTENSIONS)
42 DependsOn( 42 DependsOn(
43 extensions::ExtensionsBrowserClient::Get()->GetExtensionSystemFactory()); 43 extensions::ExtensionsBrowserClient::Get()->GetExtensionSystemFactory());
44 #endif 44 #endif
45 DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance()); 45 DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance());
46
47 // TODO(skym, crbug.com/705545): Fix this circular dependency.
48 DependsOn(ProfileSyncServiceFactory::GetInstance()); 46 DependsOn(ProfileSyncServiceFactory::GetInstance());
49 } 47 }
50 48
51 SupervisedUserServiceFactory::~SupervisedUserServiceFactory() {} 49 SupervisedUserServiceFactory::~SupervisedUserServiceFactory() {}
52 50
53 content::BrowserContext* SupervisedUserServiceFactory::GetBrowserContextToUse( 51 content::BrowserContext* SupervisedUserServiceFactory::GetBrowserContextToUse(
54 content::BrowserContext* context) const { 52 content::BrowserContext* context) const {
55 return chrome::GetBrowserContextRedirectedInIncognito(context); 53 return chrome::GetBrowserContextRedirectedInIncognito(context);
56 } 54 }
57 55
58 KeyedService* SupervisedUserServiceFactory::BuildServiceInstanceFor( 56 KeyedService* SupervisedUserServiceFactory::BuildServiceInstanceFor(
59 content::BrowserContext* profile) const { 57 content::BrowserContext* profile) const {
60 return BuildInstanceFor(static_cast<Profile*>(profile)); 58 return BuildInstanceFor(static_cast<Profile*>(profile));
61 } 59 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/chrome_sync_client.cc » ('j') | chrome/browser/sync/chrome_sync_client.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698