| 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 <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 } | 212 } |
| 213 | 213 |
| 214 bool BrowserPolicyConnectorChromeOS::IsEnterpriseManaged() const { | 214 bool BrowserPolicyConnectorChromeOS::IsEnterpriseManaged() const { |
| 215 return install_attributes_ && install_attributes_->IsEnterpriseDevice(); | 215 return install_attributes_ && install_attributes_->IsEnterpriseDevice(); |
| 216 } | 216 } |
| 217 | 217 |
| 218 std::string BrowserPolicyConnectorChromeOS::GetEnterpriseDomain() const { | 218 std::string BrowserPolicyConnectorChromeOS::GetEnterpriseDomain() const { |
| 219 return install_attributes_ ? install_attributes_->GetDomain() : std::string(); | 219 return install_attributes_ ? install_attributes_->GetDomain() : std::string(); |
| 220 } | 220 } |
| 221 | 221 |
| 222 std::string BrowserPolicyConnectorChromeOS::GetRealm() const { |
| 223 return install_attributes_ ? install_attributes_->GetRealm() : std::string(); |
| 224 } |
| 225 |
| 222 std::string BrowserPolicyConnectorChromeOS::GetDeviceAssetID() const { | 226 std::string BrowserPolicyConnectorChromeOS::GetDeviceAssetID() const { |
| 223 if (device_cloud_policy_manager_) { | 227 if (device_cloud_policy_manager_) { |
| 224 const enterprise_management::PolicyData* policy = | 228 const enterprise_management::PolicyData* policy = |
| 225 device_cloud_policy_manager_->device_store()->policy(); | 229 device_cloud_policy_manager_->device_store()->policy(); |
| 226 if (policy && policy->has_annotated_asset_id()) | 230 if (policy && policy->has_annotated_asset_id()) |
| 227 return policy->annotated_asset_id(); | 231 return policy->annotated_asset_id(); |
| 228 } | 232 } |
| 229 return std::string(); | 233 return std::string(); |
| 230 } | 234 } |
| 231 | 235 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 device_cloud_policy_manager_->device_store()->policy(); | 352 device_cloud_policy_manager_->device_store()->policy(); |
| 349 if (policy_data) { | 353 if (policy_data) { |
| 350 affiliation_ids.insert(policy_data->device_affiliation_ids().begin(), | 354 affiliation_ids.insert(policy_data->device_affiliation_ids().begin(), |
| 351 policy_data->device_affiliation_ids().end()); | 355 policy_data->device_affiliation_ids().end()); |
| 352 } | 356 } |
| 353 } | 357 } |
| 354 return affiliation_ids; | 358 return affiliation_ids; |
| 355 } | 359 } |
| 356 | 360 |
| 357 } // namespace policy | 361 } // namespace policy |
| OLD | NEW |