Chromium Code Reviews| 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..20146e81adeb4d4ff0f0092fb6b8e678f9e14083 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,8 @@ |
| #include "base/basictypes.h" |
| #include "base/compiler_specific.h" |
| +#include "chrome/browser/policy/cloud_policy_data_store.h" |
|
Mattias Nissler (ping if slow)
2012/02/20 12:22:54
Let's move the DeviceMode enum to policy constants
pastarmovj
2012/02/20 14:26:30
Done.
|
| +#include "chrome/browser/policy/proto/device_management_backend.pb.h" |
|
Mattias Nissler (ping if slow)
2012/02/20 12:22:54
needed? I hope not.
pastarmovj
2012/02/20 14:26:30
Done.
|
| namespace chromeos { |
| class CryptohomeLibrary; |
| @@ -34,7 +36,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, |
| + CloudPolicyDataStore::DeviceMode device_mode, |
| + const std::string& device_id) WARN_UNUSED_RESULT; |
| // Checks whether this is an enterprise device. |
| bool IsEnterpriseDevice(); |
| @@ -47,6 +51,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. |
| + CloudPolicyDataStore::DeviceMode GetMode(); |
| + |
| private: |
| // Makes sure the local caches for enterprise-related install attributes are |
| // up-to-date with what cryptohome has. |
| @@ -56,6 +69,9 @@ class EnterpriseInstallAttributes { |
| bool device_locked_; |
| std::string registration_user_; |
| + std::string registration_domain_; |
| + std::string registration_device_id_; |
| + CloudPolicyDataStore::DeviceMode registration_mode_; |
| DISALLOW_COPY_AND_ASSIGN(EnterpriseInstallAttributes); |
| }; |