OLD | NEW |
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" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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; |
52 | 52 |
53 return service->GetBrokerForUser(user->email()); | 53 return service->GetBrokerForUser(user->GetUserID()); |
54 } | 54 } |
55 | 55 |
56 } // namespace | 56 } // namespace |
57 #endif // OS_CHROMEOS | 57 #endif // OS_CHROMEOS |
58 | 58 |
59 // static | 59 // static |
60 SchemaRegistryServiceFactory* SchemaRegistryServiceFactory::GetInstance() { | 60 SchemaRegistryServiceFactory* SchemaRegistryServiceFactory::GetInstance() { |
61 return Singleton<SchemaRegistryServiceFactory>::get(); | 61 return Singleton<SchemaRegistryServiceFactory>::get(); |
62 } | 62 } |
63 | 63 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |