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 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_ENTERPRISE_INSTALL_ATTRIBUTES_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_ENTERPRISE_INSTALL_ATTRIBUTES_H_ |
6 #define CHROME_BROWSER_CHROMEOS_POLICY_ENTERPRISE_INSTALL_ATTRIBUTES_H_ | 6 #define CHROME_BROWSER_CHROMEOS_POLICY_ENTERPRISE_INSTALL_ATTRIBUTES_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 static const char kAttrEnterpriseDomain[]; | 47 static const char kAttrEnterpriseDomain[]; |
48 static const char kAttrEnterpriseMode[]; | 48 static const char kAttrEnterpriseMode[]; |
49 static const char kAttrEnterpriseOwned[]; | 49 static const char kAttrEnterpriseOwned[]; |
50 static const char kAttrEnterpriseUser[]; | 50 static const char kAttrEnterpriseUser[]; |
51 static const char kAttrConsumerKioskEnabled[]; | 51 static const char kAttrConsumerKioskEnabled[]; |
52 | 52 |
53 explicit EnterpriseInstallAttributes( | 53 explicit EnterpriseInstallAttributes( |
54 chromeos::CryptohomeClient* cryptohome_client); | 54 chromeos::CryptohomeClient* cryptohome_client); |
55 ~EnterpriseInstallAttributes(); | 55 ~EnterpriseInstallAttributes(); |
56 | 56 |
57 // Reads data from the cache file. The cache file is used to work around slow | 57 // Reads data from the cache file which is created early during the boot |
58 // cryptohome startup, which takes a while to register its DBus interface. | 58 // process. The cache file is used to work around slow cryptohome startup, |
59 // See http://crosbug.com/37367 for background on this. | 59 // which takes a while to register its DBus interface. See |
| 60 // http://crosbug.com/37367 for background on this. |
60 void ReadCacheFile(const base::FilePath& cache_file); | 61 void ReadCacheFile(const base::FilePath& cache_file); |
61 | 62 |
62 // Makes sure the local caches for enterprise-related install attributes are | 63 // Makes sure the local caches for enterprise-related install attributes are |
63 // up-to-date with what cryptohome has. This method checks the readiness of | 64 // up-to-date with what cryptohome has. This method checks the readiness of |
64 // attributes and read them if ready. Actual read will be performed in | 65 // attributes and read them if ready. Actual read will be performed in |
65 // ReadAttributesIfReady(). | 66 // ReadAttributesIfReady(). |
66 void ReadImmutableAttributes(const base::Closure& callback); | 67 void ReadImmutableAttributes(const base::Closure& callback); |
67 | 68 |
68 // Locks the device to be an enterprise device registered by the given user. | 69 // Locks the device to be an enterprise device registered by the given user. |
69 // This can also be called after the lock has already been taken, in which | 70 // This can also be called after the lock has already been taken, in which |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 chromeos::CryptohomeClient* cryptohome_client_; | 133 chromeos::CryptohomeClient* cryptohome_client_; |
133 | 134 |
134 base::WeakPtrFactory<EnterpriseInstallAttributes> weak_ptr_factory_; | 135 base::WeakPtrFactory<EnterpriseInstallAttributes> weak_ptr_factory_; |
135 | 136 |
136 DISALLOW_COPY_AND_ASSIGN(EnterpriseInstallAttributes); | 137 DISALLOW_COPY_AND_ASSIGN(EnterpriseInstallAttributes); |
137 }; | 138 }; |
138 | 139 |
139 } // namespace policy | 140 } // namespace policy |
140 | 141 |
141 #endif // CHROME_BROWSER_CHROMEOS_POLICY_ENTERPRISE_INSTALL_ATTRIBUTES_H_ | 142 #endif // CHROME_BROWSER_CHROMEOS_POLICY_ENTERPRISE_INSTALL_ATTRIBUTES_H_ |
OLD | NEW |