| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 Delegate* callback) = 0; | 77 Delegate* callback) = 0; |
| 78 | 78 |
| 79 // Asks cryptohomed to mount a tmpfs for BWSI mode. | 79 // Asks cryptohomed to mount a tmpfs for BWSI mode. |
| 80 virtual bool MountForBwsi(int* error_code) = 0; | 80 virtual bool MountForBwsi(int* error_code) = 0; |
| 81 | 81 |
| 82 // Asks cryptohomed to asynchronously to mount a tmpfs for BWSI mode. | 82 // Asks cryptohomed to asynchronously to mount a tmpfs for BWSI mode. |
| 83 // Returns true if the attempt is successfully initiated. | 83 // Returns true if the attempt is successfully initiated. |
| 84 // d->OnComplete() will be called with status info on completion. | 84 // d->OnComplete() will be called with status info on completion. |
| 85 virtual bool AsyncMountForBwsi(Delegate* callback) = 0; | 85 virtual bool AsyncMountForBwsi(Delegate* callback) = 0; |
| 86 | 86 |
| 87 // Asks cryptohomed to unmount the currently mounted cryptohome. |
| 88 // Returns false if the cryptohome could not be unmounted, true otherwise. |
| 89 virtual bool Unmount() = 0; |
| 90 |
| 87 // Asks cryptohomed to try to find the cryptohome for |user_email| and then | 91 // Asks cryptohomed to try to find the cryptohome for |user_email| and then |
| 88 // nuke it. | 92 // nuke it. |
| 89 virtual bool Remove(const std::string& user_email) = 0; | 93 virtual bool Remove(const std::string& user_email) = 0; |
| 90 | 94 |
| 91 // Asks cryptohomed to asynchronously try to find the cryptohome for | 95 // Asks cryptohomed to asynchronously try to find the cryptohome for |
| 92 // |user_email| and then nuke it. | 96 // |user_email| and then nuke it. |
| 93 virtual bool AsyncRemove(const std::string& user_email, | 97 virtual bool AsyncRemove(const std::string& user_email, |
| 94 Delegate* callback) = 0; | 98 Delegate* callback) = 0; |
| 95 | 99 |
| 96 // Asks cryptohomed if a drive is currently mounted. | 100 // Asks cryptohomed if a drive is currently mounted. |
| 97 virtual bool IsMounted() = 0; | 101 virtual bool IsMounted() = 0; |
| 98 | 102 |
| 99 // Asks cryptohomed for the system salt. | 103 // Asks cryptohomed for the system salt. |
| 100 virtual CryptohomeBlob GetSystemSalt() = 0; | 104 virtual CryptohomeBlob GetSystemSalt() = 0; |
| 101 | 105 |
| 102 // Factory function, creates a new instance and returns ownership. | 106 // Factory function, creates a new instance and returns ownership. |
| 103 // For normal usage, access the singleton via CrosLibrary::Get(). | 107 // For normal usage, access the singleton via CrosLibrary::Get(). |
| 104 static CryptohomeLibrary* GetImpl(bool stub); | 108 static CryptohomeLibrary* GetImpl(bool stub); |
| 105 }; | 109 }; |
| 106 | 110 |
| 107 } // namespace chromeos | 111 } // namespace chromeos |
| 108 | 112 |
| 109 #endif // CHROME_BROWSER_CHROMEOS_CROS_CRYPTOHOME_LIBRARY_H_ | 113 #endif // CHROME_BROWSER_CHROMEOS_CROS_CRYPTOHOME_LIBRARY_H_ |
| OLD | NEW |