| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/chromeos/policy/user_cloud_policy_manager_factory_chrom
eos.h" | 5 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chrom
eos.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 io_task_runner)); | 202 io_task_runner)); |
| 203 | 203 |
| 204 bool wildcard_match = false; | 204 bool wildcard_match = false; |
| 205 if (connector->IsEnterpriseManaged() && | 205 if (connector->IsEnterpriseManaged() && |
| 206 chromeos::LoginUtils::IsWhitelisted(username, &wildcard_match) && | 206 chromeos::LoginUtils::IsWhitelisted(username, &wildcard_match) && |
| 207 wildcard_match && | 207 wildcard_match && |
| 208 !connector->IsNonEnterpriseUser(username)) { | 208 !connector->IsNonEnterpriseUser(username)) { |
| 209 manager->EnableWildcardLoginCheck(username); | 209 manager->EnableWildcardLoginCheck(username); |
| 210 } | 210 } |
| 211 | 211 |
| 212 manager->Init(SchemaRegistryServiceFactory::GetForContext(profile)); | 212 manager->Init( |
| 213 SchemaRegistryServiceFactory::GetForContext(profile)->registry()); |
| 213 manager->Connect(g_browser_process->local_state(), | 214 manager->Connect(g_browser_process->local_state(), |
| 214 device_management_service, | 215 device_management_service, |
| 215 g_browser_process->system_request_context(), | 216 g_browser_process->system_request_context(), |
| 216 affiliation); | 217 affiliation); |
| 217 | 218 |
| 218 DCHECK(managers_.find(profile) == managers_.end()); | 219 DCHECK(managers_.find(profile) == managers_.end()); |
| 219 managers_[profile] = manager.get(); | 220 managers_[profile] = manager.get(); |
| 220 return manager.Pass(); | 221 return manager.Pass(); |
| 221 } | 222 } |
| 222 | 223 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 237 BrowserContextKeyedBaseFactory::BrowserContextDestroyed(context); | 238 BrowserContextKeyedBaseFactory::BrowserContextDestroyed(context); |
| 238 } | 239 } |
| 239 | 240 |
| 240 void UserCloudPolicyManagerFactoryChromeOS::SetEmptyTestingFactory( | 241 void UserCloudPolicyManagerFactoryChromeOS::SetEmptyTestingFactory( |
| 241 content::BrowserContext* context) {} | 242 content::BrowserContext* context) {} |
| 242 | 243 |
| 243 void UserCloudPolicyManagerFactoryChromeOS::CreateServiceNow( | 244 void UserCloudPolicyManagerFactoryChromeOS::CreateServiceNow( |
| 244 content::BrowserContext* context) {} | 245 content::BrowserContext* context) {} |
| 245 | 246 |
| 246 } // namespace policy | 247 } // namespace policy |
| OLD | NEW |