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 c1266eb3e03e9c785577b5d6b18210b88fc87c4a..34768096e3defaa930243ef859b0dfb48603fccf 100644 |
| --- a/chrome/browser/policy/enterprise_install_attributes.h |
| +++ b/chrome/browser/policy/enterprise_install_attributes.h |
| @@ -5,12 +5,16 @@ |
| #ifndef CHROME_BROWSER_POLICY_ENTERPRISE_INSTALL_ATTRIBUTES_H_ |
| #define CHROME_BROWSER_POLICY_ENTERPRISE_INSTALL_ATTRIBUTES_H_ |
| +#include <map> |
| #include <string> |
| #include "base/basictypes.h" |
| #include "base/compiler_specific.h" |
| +#include "base/file_path.h" |
| #include "chrome/browser/policy/cloud_policy_constants.h" |
| +class FilePath; |
|
Joao da Silva
2013/01/17 19:53:25
file_path.h already included
Mattias Nissler (ping if slow)
2013/01/17 20:34:43
Done.
|
| + |
| namespace chromeos { |
| class CryptohomeLibrary; |
| } |
| @@ -29,8 +33,16 @@ class EnterpriseInstallAttributes { |
| LOCK_WRONG_USER, |
| }; |
| + // Standard cache file name. |
| + static const FilePath::CharType kCacheFilePath[]; |
| + |
| explicit EnterpriseInstallAttributes(chromeos::CryptohomeLibrary* cryptohome); |
| + // Reads data from the cache file. 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 FilePath& cache_file); |
|
Joao da Silva
2013/01/17 19:53:25
Why the argument and the static const? Just ReadCa
Mattias Nissler (ping if slow)
2013/01/17 20:34:43
Wrote the test :)
|
| + |
| // 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. |
| @@ -63,8 +75,14 @@ class EnterpriseInstallAttributes { |
| // up-to-date with what cryptohome has. |
| void ReadImmutableAttributes(); |
| + // Decodes the install attributes provided in |attr_map|. |
| + void DecodeInstallAttributes( |
| + const std::map<std::string, std::string>& attr_map); |
| + |
| chromeos::CryptohomeLibrary* cryptohome_; |
| + bool attrs_read_; |
| + |
| bool device_locked_; |
| std::string registration_user_; |
| std::string registration_domain_; |