| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser_policy_connector.h" | 5 #include "chrome/browser/policy/browser_policy_connector.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 device_local_account_policy_provider_.reset( | 262 device_local_account_policy_provider_.reset( |
| 263 new DeviceLocalAccountPolicyProvider( | 263 new DeviceLocalAccountPolicyProvider( |
| 264 user_name, device_local_account_policy_service_.get())); | 264 user_name, device_local_account_policy_service_.get())); |
| 265 | 265 |
| 266 device_local_account_policy_provider_->Init(); | 266 device_local_account_policy_provider_->Init(); |
| 267 global_user_cloud_policy_provider_.SetDelegate( | 267 global_user_cloud_policy_provider_.SetDelegate( |
| 268 device_local_account_policy_provider_.get()); | 268 device_local_account_policy_provider_.get()); |
| 269 } else if (!IsNonEnterpriseUser(user_name)) { | 269 } else if (!IsNonEnterpriseUser(user_name)) { |
| 270 scoped_ptr<CloudPolicyStore> store( | 270 scoped_ptr<CloudPolicyStore> store( |
| 271 new UserCloudPolicyStoreChromeOS( | 271 new UserCloudPolicyStoreChromeOS( |
| 272 chromeos::DBusThreadManager::Get()->GetCryptohomeClient(), |
| 272 chromeos::DBusThreadManager::Get()->GetSessionManagerClient(), | 273 chromeos::DBusThreadManager::Get()->GetSessionManagerClient(), |
| 273 user_name, policy_cache_file, token_cache_file)); | 274 user_name, policy_cache_file, token_cache_file)); |
| 274 user_cloud_policy_manager_.reset( | 275 user_cloud_policy_manager_.reset( |
| 275 new UserCloudPolicyManagerChromeOS(store.Pass(), | 276 new UserCloudPolicyManagerChromeOS(store.Pass(), |
| 276 wait_for_policy_fetch)); | 277 wait_for_policy_fetch)); |
| 277 | 278 |
| 278 user_cloud_policy_manager_->Init(); | 279 user_cloud_policy_manager_->Init(); |
| 279 user_cloud_policy_manager_->Connect(g_browser_process->local_state(), | 280 user_cloud_policy_manager_->Connect(g_browser_process->local_state(), |
| 280 device_management_service_.get(), | 281 device_management_service_.get(), |
| 281 GetUserAffiliation(user_name)); | 282 GetUserAffiliation(user_name)); |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 return new AsyncPolicyProvider(loader.Pass()); | 528 return new AsyncPolicyProvider(loader.Pass()); |
| 528 } else { | 529 } else { |
| 529 return NULL; | 530 return NULL; |
| 530 } | 531 } |
| 531 #else | 532 #else |
| 532 return NULL; | 533 return NULL; |
| 533 #endif | 534 #endif |
| 534 } | 535 } |
| 535 | 536 |
| 536 } // namespace policy | 537 } // namespace policy |
| OLD | NEW |