| 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_CROS_CRYPTOHOME_LIBRARY_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_CRYPTOHOME_LIBRARY_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_CROS_CRYPTOHOME_LIBRARY_H_ | 6 #define CHROME_BROWSER_CHROMEOS_CROS_CRYPTOHOME_LIBRARY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 namespace chromeos { | 10 namespace chromeos { |
| 11 | 11 |
| 12 // This interface defines the interaction with the ChromeOS cryptohome library | 12 // This interface defines the interaction with the ChromeOS cryptohome library |
| 13 // APIs. | 13 // APIs. |
| 14 class CryptohomeLibrary { | 14 class CryptohomeLibrary { |
| 15 public: | 15 public: |
| 16 CryptohomeLibrary(); | 16 CryptohomeLibrary(); |
| 17 virtual ~CryptohomeLibrary(); | 17 virtual ~CryptohomeLibrary(); |
| 18 | 18 |
| 19 // Asks cryptohomed if a drive is currently mounted. | |
| 20 virtual bool IsMounted() = 0; | |
| 21 | |
| 22 // Wrappers of the functions for working with Tpm. | 19 // Wrappers of the functions for working with Tpm. |
| 23 | 20 |
| 24 // Returns whether Tpm is presented and enabled. | 21 // Returns whether Tpm is presented and enabled. |
| 25 virtual bool TpmIsEnabled() = 0; | 22 virtual bool TpmIsEnabled() = 0; |
| 26 | 23 |
| 27 // Returns whether device has already been owned. | 24 // Returns whether device has already been owned. |
| 28 virtual bool TpmIsOwned() = 0; | 25 virtual bool TpmIsOwned() = 0; |
| 29 | 26 |
| 30 // Returns whether device is being owned (Tpm password is generating). | 27 // Returns whether device is being owned (Tpm password is generating). |
| 31 virtual bool TpmIsBeingOwned() = 0; | 28 virtual bool TpmIsBeingOwned() = 0; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 50 virtual std::string GetSystemSalt() = 0; | 47 virtual std::string GetSystemSalt() = 0; |
| 51 | 48 |
| 52 // Factory function, creates a new instance and returns ownership. | 49 // Factory function, creates a new instance and returns ownership. |
| 53 // For normal usage, access the singleton via CrosLibrary::Get(). | 50 // For normal usage, access the singleton via CrosLibrary::Get(). |
| 54 static CryptohomeLibrary* GetImpl(bool stub); | 51 static CryptohomeLibrary* GetImpl(bool stub); |
| 55 }; | 52 }; |
| 56 | 53 |
| 57 } // namespace chromeos | 54 } // namespace chromeos |
| 58 | 55 |
| 59 #endif // CHROME_BROWSER_CHROMEOS_CROS_CRYPTOHOME_LIBRARY_H_ | 56 #endif // CHROME_BROWSER_CHROMEOS_CROS_CRYPTOHOME_LIBRARY_H_ |
| OLD | NEW |