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 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/singleton.h" | 10 #include "base/singleton.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 // Asks cryptohomed to try to find the cryptohome for |user_email| and then | 24 // Asks cryptohomed to try to find the cryptohome for |user_email| and then |
25 // mount it using |passhash| to unlock the key. | 25 // mount it using |passhash| to unlock the key. |
26 virtual bool Mount(const std::string& user_email, | 26 virtual bool Mount(const std::string& user_email, |
27 const std::string& passhash); | 27 const std::string& passhash); |
28 | 28 |
29 // Asks cryptohomed to try to find the cryptohome for |user_email| and then | 29 // Asks cryptohomed to try to find the cryptohome for |user_email| and then |
30 // use |passhash| to unlock the key. | 30 // use |passhash| to unlock the key. |
31 virtual bool CheckKey(const std::string& user_email, | 31 virtual bool CheckKey(const std::string& user_email, |
32 const std::string& passhash); | 32 const std::string& passhash); |
33 | 33 |
| 34 // Asks cryptohomed if a drive is currently mounted. |
| 35 virtual bool IsMounted(); |
| 36 |
34 private: | 37 private: |
35 friend struct DefaultSingletonTraits<CryptohomeLibrary>; | 38 friend struct DefaultSingletonTraits<CryptohomeLibrary>; |
36 friend class MockCryptohomeLibrary; | 39 friend class MockCryptohomeLibrary; |
37 | 40 |
38 CryptohomeLibrary() {} | 41 CryptohomeLibrary() {} |
39 ~CryptohomeLibrary() {} | 42 ~CryptohomeLibrary() {} |
40 | 43 |
41 DISALLOW_COPY_AND_ASSIGN(CryptohomeLibrary); | 44 DISALLOW_COPY_AND_ASSIGN(CryptohomeLibrary); |
42 }; | 45 }; |
43 | 46 |
44 } // namespace chromeos | 47 } // namespace chromeos |
45 | 48 |
46 #endif // CHROME_BROWSER_CHROMEOS_CROS_CRYPTOHOME_LIBRARY_H_ | 49 #endif // CHROME_BROWSER_CHROMEOS_CROS_CRYPTOHOME_LIBRARY_H_ |
OLD | NEW |