| OLD | NEW |
| 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/chromeos/policy/browser_policy_connector_chromeos.h" | 5 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 std::string BrowserPolicyConnectorChromeOS::GetDeviceAssetID() { | 254 std::string BrowserPolicyConnectorChromeOS::GetDeviceAssetID() { |
| 255 if (device_cloud_policy_manager_) { | 255 if (device_cloud_policy_manager_) { |
| 256 const enterprise_management::PolicyData* policy = | 256 const enterprise_management::PolicyData* policy = |
| 257 device_cloud_policy_manager_->device_store()->policy(); | 257 device_cloud_policy_manager_->device_store()->policy(); |
| 258 if (policy && policy->has_annotated_asset_id()) | 258 if (policy && policy->has_annotated_asset_id()) |
| 259 return policy->annotated_asset_id(); | 259 return policy->annotated_asset_id(); |
| 260 } | 260 } |
| 261 return std::string(); | 261 return std::string(); |
| 262 } | 262 } |
| 263 | 263 |
| 264 std::string BrowserPolicyConnectorChromeOS::GetDirectoryApiID() { |
| 265 if (device_cloud_policy_manager_) { |
| 266 const enterprise_management::PolicyData* policy = |
| 267 device_cloud_policy_manager_->device_store()->policy(); |
| 268 if (policy && policy->has_directory_api_id()) |
| 269 return policy->directory_api_id(); |
| 270 } |
| 271 return std::string(); |
| 272 } |
| 273 |
| 264 DeviceMode BrowserPolicyConnectorChromeOS::GetDeviceMode() { | 274 DeviceMode BrowserPolicyConnectorChromeOS::GetDeviceMode() { |
| 265 return install_attributes_ ? install_attributes_->GetMode() | 275 return install_attributes_ ? install_attributes_->GetMode() |
| 266 : DEVICE_MODE_NOT_SET; | 276 : DEVICE_MODE_NOT_SET; |
| 267 } | 277 } |
| 268 | 278 |
| 269 EnrollmentConfig BrowserPolicyConnectorChromeOS::GetPrescribedEnrollmentConfig() | 279 EnrollmentConfig BrowserPolicyConnectorChromeOS::GetPrescribedEnrollmentConfig() |
| 270 const { | 280 const { |
| 271 if (device_cloud_policy_initializer_) | 281 if (device_cloud_policy_initializer_) |
| 272 return device_cloud_policy_initializer_->GetPrescribedEnrollmentConfig(); | 282 return device_cloud_policy_initializer_->GetPrescribedEnrollmentConfig(); |
| 273 | 283 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 consumer_device_management_service_.get(), | 384 consumer_device_management_service_.get(), |
| 375 GetBackgroundTaskRunner(), | 385 GetBackgroundTaskRunner(), |
| 376 install_attributes_.get(), | 386 install_attributes_.get(), |
| 377 state_keys_broker_.get(), | 387 state_keys_broker_.get(), |
| 378 device_cloud_policy_manager_->device_store(), | 388 device_cloud_policy_manager_->device_store(), |
| 379 device_cloud_policy_manager_)); | 389 device_cloud_policy_manager_)); |
| 380 device_cloud_policy_initializer_->Init(); | 390 device_cloud_policy_initializer_->Init(); |
| 381 } | 391 } |
| 382 | 392 |
| 383 } // namespace policy | 393 } // namespace policy |
| OLD | NEW |