Index: chrome/browser/chromeos/policy/enterprise_install_attributes.h |
diff --git a/chrome/browser/chromeos/policy/enterprise_install_attributes.h b/chrome/browser/chromeos/policy/enterprise_install_attributes.h |
index bb9a681c721e037fa0a6f657d8de611f46748e2a..584a6fa7fee8842145ca24b1aa67c1aacb595bfc 100644 |
--- a/chrome/browser/chromeos/policy/enterprise_install_attributes.h |
+++ b/chrome/browser/chromeos/policy/enterprise_install_attributes.h |
@@ -52,11 +52,11 @@ class EnterpriseInstallAttributes { |
chromeos::CryptohomeClient* cryptohome_client); |
~EnterpriseInstallAttributes(); |
- // Reads data from the cache file which is created early during the boot |
- // process. The cache file is used to work around slow cryptohome startup, |
- // which takes a while to register its DBus interface. See |
- // http://crosbug.com/37367 for background on this. |
- void ReadCacheFile(const base::FilePath& cache_file); |
+ // Tries to read install attributes from the cache file which is created early |
+ // during the boot process. The cache file is used to work around slow |
+ // cryptohome startup, which takes a while to register its DBus interface. |
+ // (See http://crosbug.com/37367 for background on this.) |
+ void Init(const base::FilePath& cache_file); |
// Makes sure the local caches for enterprise-related install attributes are |
// up-to-date with what cryptohome has. This method checks the readiness of |
@@ -97,7 +97,13 @@ class EnterpriseInstallAttributes { |
DeviceMode GetMode(); |
protected: |
+ // True if install attributes have been read successfully. False if read |
+ // failed or no read attempt was made. |
bool device_locked_; |
Mattias Nissler (ping if slow)
2015/06/24 08:34:39
nit: blank line before comment.
Thiemo Nagel
2015/06/24 10:43:36
Done.
|
+ // Whether the TPM / install attributes consistency check is running. |
+ bool consistency_check_running_; |
Mattias Nissler (ping if slow)
2015/06/24 08:34:39
nit: blank line before comment.
Thiemo Nagel
2015/06/24 10:43:36
Done.
|
+ // To be run after the consistency check has finished. |
+ base::Closure post_check_action_; |
Mattias Nissler (ping if slow)
2015/06/24 08:34:39
nit: blank line here. The members below conceptual
Thiemo Nagel
2015/06/24 10:43:36
Done.
|
std::string registration_user_; |
std::string registration_domain_; |
std::string registration_device_id_; |
@@ -158,6 +164,17 @@ class EnterpriseInstallAttributes { |
void OnReadImmutableAttributes(const std::string& user, |
const LockResultCallback& callback); |
+ // Check state of install attributes against TPM lock state and generate UMA |
+ // for the result. Asynchronously retry |dbus_tries| times in case of DBUS |
+ // errors (cryptohomed startup is slow). |
+ void TriggerConsistencyCheck(int dbus_tries); |
+ |
+ // Callback for TpmIsOwned() DBUS call. Generates UMA or schedules retry in |
+ // case of DBUS error. |
+ void OnTpmIsOwned(int dbus_tries_remaining, |
Mattias Nissler (ping if slow)
2015/06/24 08:34:39
The name of this function is misleading. Should On
Thiemo Nagel
2015/06/24 10:43:36
You're right. Done.
|
+ chromeos::DBusMethodCallStatus call_status, |
+ bool result); |
+ |
chromeos::CryptohomeClient* cryptohome_client_; |
base::WeakPtrFactory<EnterpriseInstallAttributes> weak_ptr_factory_; |