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

Unified Diff: chrome/browser/chromeos/settings/token_encryptor.cc

Issue 2095523002: Make //crypto factories return std::unique_ptr<>s (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: I'm blind Created 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/settings/token_encryptor.cc
diff --git a/chrome/browser/chromeos/settings/token_encryptor.cc b/chrome/browser/chromeos/settings/token_encryptor.cc
index 8ff42eeb724d524d884923644cd3ea7e2858589d..100622122c83a077791d076d7dcc71d01519eb19 100644
--- a/chrome/browser/chromeos/settings/token_encryptor.cc
+++ b/chrome/browser/chromeos/settings/token_encryptor.cc
@@ -31,7 +31,7 @@ CryptohomeTokenEncryptor::CryptohomeTokenEncryptor(
DCHECK(!system_salt.empty());
// TODO(davidroche): should this use the system salt for both the password
// and the salt value, or should this use a separate salt value?
- system_salt_key_.reset(PassphraseToKey(system_salt_, system_salt_));
+ system_salt_key_ = PassphraseToKey(system_salt_, system_salt_);
}
CryptohomeTokenEncryptor::~CryptohomeTokenEncryptor() {
@@ -67,7 +67,7 @@ std::string CryptohomeTokenEncryptor::DecryptWithSystemSalt(
encrypted_token_hex);
}
-crypto::SymmetricKey* CryptohomeTokenEncryptor::PassphraseToKey(
+std::unique_ptr<crypto::SymmetricKey> CryptohomeTokenEncryptor::PassphraseToKey(
const std::string& passphrase,
const std::string& salt) {
return crypto::SymmetricKey::DeriveKeyFromPassword(

Powered by Google App Engine
This is Rietveld 408576698