| Index: chrome/browser/policy/enterprise_install_attributes.h
|
| diff --git a/chrome/browser/policy/enterprise_install_attributes.h b/chrome/browser/policy/enterprise_install_attributes.h
|
| index 90d728a277d48dbabe7c64f767c1ae40dc5ca84e..f107114422a2b12def12dbccdec106f8fc89a8fa 100644
|
| --- a/chrome/browser/policy/enterprise_install_attributes.h
|
| +++ b/chrome/browser/policy/enterprise_install_attributes.h
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| @@ -10,6 +10,7 @@
|
|
|
| #include "base/basictypes.h"
|
| #include "base/compiler_specific.h"
|
| +#include "chrome/browser/policy/cloud_policy_constants.h"
|
|
|
| namespace chromeos {
|
| class CryptohomeLibrary;
|
| @@ -34,7 +35,9 @@ class EnterpriseInstallAttributes {
|
| // Locks the device to be an enterprise device registered by the given user.
|
| // This can also be called after the lock has already been taken, in which
|
| // case it checks that the passed user agrees with the locked attribute.
|
| - LockResult LockDevice(const std::string& user) WARN_UNUSED_RESULT;
|
| + LockResult LockDevice(const std::string& user,
|
| + DeviceMode device_mode,
|
| + const std::string& device_id) WARN_UNUSED_RESULT;
|
|
|
| // Checks whether this is an enterprise device.
|
| bool IsEnterpriseDevice();
|
| @@ -47,6 +50,15 @@ class EnterpriseInstallAttributes {
|
| // device is not an enterprise device.
|
| std::string GetRegistrationUser();
|
|
|
| + // Gets the device id that was generated when the device was registered.
|
| + // Returns an empty string if the device is not an enterprise device or the
|
| + // device id was not stored in the lockbox (prior to R19).
|
| + std::string GetDeviceId();
|
| +
|
| + // Gets the mode the device was enrolled to. The return value for devices that
|
| + // are not locked yet will be DEVICE_MODE_UNKNOWN.
|
| + DeviceMode GetMode();
|
| +
|
| private:
|
| // Makes sure the local caches for enterprise-related install attributes are
|
| // up-to-date with what cryptohome has.
|
| @@ -56,6 +68,9 @@ class EnterpriseInstallAttributes {
|
|
|
| bool device_locked_;
|
| std::string registration_user_;
|
| + std::string registration_domain_;
|
| + std::string registration_device_id_;
|
| + DeviceMode registration_mode_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(EnterpriseInstallAttributes);
|
| };
|
|
|