| 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/chromeos/settings/install_attributes.h" | 5 #include "chrome/browser/chromeos/settings/install_attributes.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 } | 318 } |
| 319 | 319 |
| 320 bool InstallAttributes::IsEnterpriseDevice() const { | 320 bool InstallAttributes::IsEnterpriseDevice() const { |
| 321 if (!device_locked_) { | 321 if (!device_locked_) { |
| 322 return false; | 322 return false; |
| 323 } | 323 } |
| 324 return registration_mode_ == policy::DEVICE_MODE_ENTERPRISE || | 324 return registration_mode_ == policy::DEVICE_MODE_ENTERPRISE || |
| 325 registration_mode_ == policy::DEVICE_MODE_ENTERPRISE_AD; | 325 registration_mode_ == policy::DEVICE_MODE_ENTERPRISE_AD; |
| 326 } | 326 } |
| 327 | 327 |
| 328 bool InstallAttributes::IsEnterpriseAD() const { |
| 329 if (!device_locked_) { |
| 330 return false; |
| 331 } |
| 332 return registration_mode_ == policy::DEVICE_MODE_ENTERPRISE_AD; |
| 333 } |
| 334 |
| 328 bool InstallAttributes::IsConsumerKioskDeviceWithAutoLaunch() { | 335 bool InstallAttributes::IsConsumerKioskDeviceWithAutoLaunch() { |
| 329 return device_locked_ && | 336 return device_locked_ && |
| 330 registration_mode_ == policy::DEVICE_MODE_CONSUMER_KIOSK_AUTOLAUNCH; | 337 registration_mode_ == policy::DEVICE_MODE_CONSUMER_KIOSK_AUTOLAUNCH; |
| 331 } | 338 } |
| 332 | 339 |
| 333 void InstallAttributes::TriggerConsistencyCheck(int dbus_retries) { | 340 void InstallAttributes::TriggerConsistencyCheck(int dbus_retries) { |
| 334 cryptohome_client_->TpmIsOwned( | 341 cryptohome_client_->TpmIsOwned( |
| 335 base::Bind(&InstallAttributes::OnTpmOwnerCheckCompleted, | 342 base::Bind(&InstallAttributes::OnTpmOwnerCheckCompleted, |
| 336 weak_ptr_factory_.GetWeakPtr(), | 343 weak_ptr_factory_.GetWeakPtr(), |
| 337 dbus_retries)); | 344 dbus_retries)); |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 499 return; | 506 return; |
| 500 } | 507 } |
| 501 | 508 |
| 502 WarnIfNonempty(attr_map, kAttrConsumerKioskEnabled); | 509 WarnIfNonempty(attr_map, kAttrConsumerKioskEnabled); |
| 503 if (user_deprecated.empty()) { | 510 if (user_deprecated.empty()) { |
| 504 registration_mode_ = policy::DEVICE_MODE_CONSUMER; | 511 registration_mode_ = policy::DEVICE_MODE_CONSUMER; |
| 505 } | 512 } |
| 506 } | 513 } |
| 507 | 514 |
| 508 } // namespace chromeos | 515 } // namespace chromeos |
| OLD | NEW |