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

Side by Side Diff: chrome/browser/chromeos/settings/token_encryptor.h

Issue 623293003: replace OVERRIDE and FINAL with override and final in chrome/browser/chromeos/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: run git cl format on echo_dialog_view.h Created 6 years, 2 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_SETTINGS_TOKEN_ENCRYPTOR_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_SETTINGS_TOKEN_ENCRYPTOR_H_
6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_TOKEN_ENCRYPTOR_H_ 6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_TOKEN_ENCRYPTOR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 23 matching lines...) Expand all
34 }; 34 };
35 35
36 // TokenEncryptor based on the system salt from cryptohome daemon. This 36 // TokenEncryptor based on the system salt from cryptohome daemon. This
37 // implementation is used in production. 37 // implementation is used in production.
38 class CryptohomeTokenEncryptor : public TokenEncryptor { 38 class CryptohomeTokenEncryptor : public TokenEncryptor {
39 public: 39 public:
40 explicit CryptohomeTokenEncryptor(const std::string& system_salt); 40 explicit CryptohomeTokenEncryptor(const std::string& system_salt);
41 virtual ~CryptohomeTokenEncryptor(); 41 virtual ~CryptohomeTokenEncryptor();
42 42
43 // TokenEncryptor overrides: 43 // TokenEncryptor overrides:
44 virtual std::string EncryptWithSystemSalt(const std::string& token) OVERRIDE; 44 virtual std::string EncryptWithSystemSalt(const std::string& token) override;
45 virtual std::string DecryptWithSystemSalt( 45 virtual std::string DecryptWithSystemSalt(
46 const std::string& encrypted_token_hex) OVERRIDE; 46 const std::string& encrypted_token_hex) override;
47 47
48 private: 48 private:
49 // Converts |passphrase| to a SymmetricKey using the given |salt|. 49 // Converts |passphrase| to a SymmetricKey using the given |salt|.
50 crypto::SymmetricKey* PassphraseToKey(const std::string& passphrase, 50 crypto::SymmetricKey* PassphraseToKey(const std::string& passphrase,
51 const std::string& salt); 51 const std::string& salt);
52 52
53 // Encrypts (AES) the token given |key| and |salt|. 53 // Encrypts (AES) the token given |key| and |salt|.
54 std::string EncryptTokenWithKey(crypto::SymmetricKey* key, 54 std::string EncryptTokenWithKey(crypto::SymmetricKey* key,
55 const std::string& salt, 55 const std::string& salt,
56 const std::string& token); 56 const std::string& token);
(...skipping 10 matching lines...) Expand all
67 // A key based on the system salt. Useful for encrypting device-level 67 // A key based on the system salt. Useful for encrypting device-level
68 // data for which we have no additional credentials. 68 // data for which we have no additional credentials.
69 scoped_ptr<crypto::SymmetricKey> system_salt_key_; 69 scoped_ptr<crypto::SymmetricKey> system_salt_key_;
70 70
71 DISALLOW_COPY_AND_ASSIGN(CryptohomeTokenEncryptor); 71 DISALLOW_COPY_AND_ASSIGN(CryptohomeTokenEncryptor);
72 }; 72 };
73 73
74 } // namespace chromeos 74 } // namespace chromeos
75 75
76 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_TOKEN_ENCRYPTOR_H_ 76 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_TOKEN_ENCRYPTOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/settings/system_settings_provider.h ('k') | chrome/browser/chromeos/sim_dialog_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698