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

Side by Side Diff: chrome/browser/policy/schema_registry_service_factory.cc

Issue 398753004: [cros] Move User class to user_manager component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/policy/profile_policy_connector_factory.cc ('k') | chrome/browser/profiles/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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/policy/schema_registry_service_factory.h" 5 #include "chrome/browser/policy/schema_registry_service_factory.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/policy/schema_registry_service.h" 8 #include "chrome/browser/policy/schema_registry_service.h"
9 #include "components/keyed_service/content/browser_context_dependency_manager.h" 9 #include "components/keyed_service/content/browser_context_dependency_manager.h"
10 #include "components/policy/core/common/schema.h" 10 #include "components/policy/core/common/schema.h"
11 #include "components/policy/core/common/schema_registry.h" 11 #include "components/policy/core/common/schema_registry.h"
12 #include "content/public/browser/browser_context.h" 12 #include "content/public/browser/browser_context.h"
13 13
14 #if defined(OS_CHROMEOS) 14 #if defined(OS_CHROMEOS)
15 #include "chrome/browser/browser_process.h" 15 #include "chrome/browser/browser_process.h"
16 #include "chrome/browser/browser_process_platform_part_chromeos.h" 16 #include "chrome/browser/browser_process_platform_part_chromeos.h"
17 #include "chrome/browser/chromeos/login/users/user.h"
18 #include "chrome/browser/chromeos/login/users/user_manager.h" 17 #include "chrome/browser/chromeos/login/users/user_manager.h"
19 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" 18 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
20 #include "chrome/browser/chromeos/policy/device_local_account_policy_service.h" 19 #include "chrome/browser/chromeos/policy/device_local_account_policy_service.h"
21 #include "chrome/browser/chromeos/profiles/profile_helper.h" 20 #include "chrome/browser/chromeos/profiles/profile_helper.h"
22 #include "chrome/browser/profiles/profile.h" 21 #include "chrome/browser/profiles/profile.h"
22 #include "components/user_manager/user.h"
23 #endif 23 #endif
24 24
25 namespace policy { 25 namespace policy {
26 26
27 #if defined(OS_CHROMEOS) 27 #if defined(OS_CHROMEOS)
28 namespace { 28 namespace {
29 29
30 DeviceLocalAccountPolicyBroker* GetBroker(content::BrowserContext* context) { 30 DeviceLocalAccountPolicyBroker* GetBroker(content::BrowserContext* context) {
31 Profile* profile = Profile::FromBrowserContext(context); 31 Profile* profile = Profile::FromBrowserContext(context);
32 32
33 if (chromeos::ProfileHelper::IsSigninProfile(profile)) 33 if (chromeos::ProfileHelper::IsSigninProfile(profile))
34 return NULL; 34 return NULL;
35 35
36 if (!chromeos::UserManager::IsInitialized()) { 36 if (!chromeos::UserManager::IsInitialized()) {
37 // Bail out in unit tests that don't have a UserManager. 37 // Bail out in unit tests that don't have a UserManager.
38 return NULL; 38 return NULL;
39 } 39 }
40 40
41 chromeos::User* user = 41 user_manager::User* user =
42 chromeos::ProfileHelper::Get()->GetUserByProfile(profile); 42 chromeos::ProfileHelper::Get()->GetUserByProfile(profile);
43 if (!user) 43 if (!user)
44 return NULL; 44 return NULL;
45 45
46 BrowserPolicyConnectorChromeOS* connector = 46 BrowserPolicyConnectorChromeOS* connector =
47 g_browser_process->platform_part()->browser_policy_connector_chromeos(); 47 g_browser_process->platform_part()->browser_policy_connector_chromeos();
48 DeviceLocalAccountPolicyService* service = 48 DeviceLocalAccountPolicyService* service =
49 connector->GetDeviceLocalAccountPolicyService(); 49 connector->GetDeviceLocalAccountPolicyService();
50 if (!service) 50 if (!service)
51 return NULL; 51 return NULL;
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 148
149 bool SchemaRegistryServiceFactory::HasTestingFactory( 149 bool SchemaRegistryServiceFactory::HasTestingFactory(
150 content::BrowserContext* context) { 150 content::BrowserContext* context) {
151 return false; 151 return false;
152 } 152 }
153 153
154 void SchemaRegistryServiceFactory::CreateServiceNow( 154 void SchemaRegistryServiceFactory::CreateServiceNow(
155 content::BrowserContext* context) {} 155 content::BrowserContext* context) {}
156 156
157 } // namespace policy 157 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/profile_policy_connector_factory.cc ('k') | chrome/browser/profiles/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698