Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(682)

Side by Side Diff: chrome/browser/chromeos/cros/cryptohome_library.h

Issue 2820006: Use GetSystemSalt from the cryptohome lib instead of reading salt off disk. (Closed)
Patch Set: Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
24 const std::string& passhash) = 0; 24 const std::string& passhash) = 0;
25 25
26 // Asks cryptohomed to try to find the cryptohome for |user_email| and then 26 // Asks cryptohomed to try to find the cryptohome for |user_email| and then
27 // use |passhash| to unlock the key. 27 // use |passhash| to unlock the key.
28 virtual bool CheckKey(const std::string& user_email, 28 virtual bool CheckKey(const std::string& user_email,
29 const std::string& passhash) = 0; 29 const std::string& passhash) = 0;
30 30
31 // Asks cryptohomed if a drive is currently mounted. 31 // Asks cryptohomed if a drive is currently mounted.
32 virtual bool IsMounted() = 0; 32 virtual bool IsMounted() = 0;
33 33
34 // Asks cryptohomed for the system salt.
35 virtual CryptohomeBlob GetSystemSalt() = 0;
36
34 }; 37 };
35 38
36 // This class handles the interaction with the ChromeOS cryptohome library APIs. 39 // This class handles the interaction with the ChromeOS cryptohome library APIs.
37 class CryptohomeLibraryImpl : public CryptohomeLibrary { 40 class CryptohomeLibraryImpl : public CryptohomeLibrary {
38 public: 41 public:
39 CryptohomeLibraryImpl() {} 42 CryptohomeLibraryImpl() {}
40 virtual ~CryptohomeLibraryImpl() {} 43 virtual ~CryptohomeLibraryImpl() {}
41 44
42 // CryptohomeLibrary overrides. 45 // CryptohomeLibrary overrides.
43 virtual bool Mount(const std::string& user_email, 46 virtual bool Mount(const std::string& user_email,
44 const std::string& passhash); 47 const std::string& passhash);
45 virtual bool CheckKey(const std::string& user_email, 48 virtual bool CheckKey(const std::string& user_email,
46 const std::string& passhash); 49 const std::string& passhash);
47 50
48 // Asks cryptohomed if a drive is currently mounted. 51 // Asks cryptohomed if a drive is currently mounted.
49 virtual bool IsMounted(); 52 virtual bool IsMounted();
50 53
54 // Asks cryptohomed for the system salt.
55 virtual CryptohomeBlob GetSystemSalt();
56
51 private: 57 private:
52 DISALLOW_COPY_AND_ASSIGN(CryptohomeLibraryImpl); 58 DISALLOW_COPY_AND_ASSIGN(CryptohomeLibraryImpl);
53 }; 59 };
54 60
55 } // namespace chromeos 61 } // namespace chromeos
56 62
57 #endif // CHROME_BROWSER_CHROMEOS_CROS_CRYPTOHOME_LIBRARY_H_ 63 #endif // CHROME_BROWSER_CHROMEOS_CROS_CRYPTOHOME_LIBRARY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698