Chromium Code Reviews| Index: chrome/browser/chromeos/settings/token_encryptor.h |
| diff --git a/chrome/browser/chromeos/settings/token_encryptor.h b/chrome/browser/chromeos/settings/token_encryptor.h |
| index 8892dc6b2b6531512f9ef4e38a0b405d308d7715..38d771110c40cce2c969b3133dabddf5a466e057 100644 |
| --- a/chrome/browser/chromeos/settings/token_encryptor.h |
| +++ b/chrome/browser/chromeos/settings/token_encryptor.h |
| @@ -33,11 +33,11 @@ class TokenEncryptor { |
| const std::string& encrypted_token_hex) = 0; |
| }; |
| -// TokenEncryptor based on the cryptohome daemon. This implementation is used |
| -// in production. |
| +// TokenEncryptor based on the system salt from cryptohome daemon. This |
| +// implementation is used in production. |
| class CryptohomeTokenEncryptor : public TokenEncryptor { |
| public: |
| - CryptohomeTokenEncryptor(); |
| + explicit CryptohomeTokenEncryptor(const std::string& system_salt); |
| virtual ~CryptohomeTokenEncryptor(); |
| // TokenEncryptor overrides: |
| @@ -46,10 +46,6 @@ class CryptohomeTokenEncryptor : public TokenEncryptor { |
| const std::string& encrypted_token_hex) OVERRIDE; |
| private: |
| - // Loads the system salt key based on the system salt from the cryptohome |
| - // daemon. Returns true on success. |
| - bool LoadSystemSaltKey(); |
| - |
| // Converts |passphrase| to a SymmetricKey using the given |salt|. |
| crypto::SymmetricKey* PassphraseToKey(const std::string& passphrase, |
| const std::string& salt); |
| @@ -64,7 +60,8 @@ class CryptohomeTokenEncryptor : public TokenEncryptor { |
| const std::string& salt, |
| const std::string& encrypted_token_hex); |
| - // The cached system salt obtained from the cryptohome daemon. |
| + // The cached system salt passed from the constructor, originally coming |
|
pneubeck (no reviews)
2013/10/24 19:44:13
nit: 'passed to' instead of 'passed from' ?
satorux1
2013/10/25 02:36:02
Done.
|
| + // from cryptohome daemon. |
| std::string system_salt_; |
| // A key based on the system salt. Useful for encrypting device-level |