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_SETTINGS_INSTALL_ATTRIBUTES_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_SETTINGS_INSTALL_ATTRIBUTES_H_ |
6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_INSTALL_ATTRIBUTES_H_ | 6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_INSTALL_ATTRIBUTES_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 LOCK_WRONG_MODE = 9, // Device already locked to a different mode. | 42 LOCK_WRONG_MODE = 9, // Device already locked to a different mode. |
43 }; | 43 }; |
44 | 44 |
45 // A callback to handle responses of methods returning a LockResult value. | 45 // A callback to handle responses of methods returning a LockResult value. |
46 typedef base::Callback<void(LockResult lock_result)> LockResultCallback; | 46 typedef base::Callback<void(LockResult lock_result)> LockResultCallback; |
47 | 47 |
48 // Return serialized InstallAttributes of an enterprise-owned configuration. | 48 // Return serialized InstallAttributes of an enterprise-owned configuration. |
49 static std::string GetEnterpriseOwnedInstallAttributesBlobForTesting( | 49 static std::string GetEnterpriseOwnedInstallAttributesBlobForTesting( |
50 const std::string& user_name); | 50 const std::string& user_name); |
51 | 51 |
| 52 // Return serialized InstallAttributes of an enterprise-owned configuration. |
| 53 static std::string |
| 54 GetActiveDirectoryEnterpriseOwnedInstallAttributesBlobForTesting( |
| 55 const std::string& realm); |
| 56 |
52 explicit InstallAttributes(CryptohomeClient* cryptohome_client); | 57 explicit InstallAttributes(CryptohomeClient* cryptohome_client); |
53 ~InstallAttributes(); | 58 ~InstallAttributes(); |
54 | 59 |
55 // Tries to read install attributes from |cache_file| to work around slow | 60 // Tries to read install attributes from |cache_file| to work around slow |
56 // cryptohome startup which takes a while to register its D-Bus interface. | 61 // cryptohome startup which takes a while to register its D-Bus interface. |
57 // (See http://crosbug.com/37367 for background on this.) When called with | 62 // (See http://crosbug.com/37367 for background on this.) When called with |
58 // kInstallAttributesFileName (created early during the boot process by | 63 // kInstallAttributesFileName (created early during the boot process by |
59 // lockbox-cache) the install attributes are fully trusted. | 64 // lockbox-cache) the install attributes are fully trusted. |
60 void Init(const base::FilePath& cache_file); | 65 void Init(const base::FilePath& cache_file); |
61 | 66 |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 CryptohomeClient* cryptohome_client_; | 208 CryptohomeClient* cryptohome_client_; |
204 | 209 |
205 base::WeakPtrFactory<InstallAttributes> weak_ptr_factory_; | 210 base::WeakPtrFactory<InstallAttributes> weak_ptr_factory_; |
206 | 211 |
207 DISALLOW_COPY_AND_ASSIGN(InstallAttributes); | 212 DISALLOW_COPY_AND_ASSIGN(InstallAttributes); |
208 }; | 213 }; |
209 | 214 |
210 } // namespace chromeos | 215 } // namespace chromeos |
211 | 216 |
212 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_INSTALL_ATTRIBUTES_H_ | 217 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_INSTALL_ATTRIBUTES_H_ |
OLD | NEW |