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

Unified Diff: components/os_crypt/os_crypt_mac.mm

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
« no previous file with comments | « components/crx_file/crx_file.cc ('k') | content/browser/download/base_file.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/os_crypt/os_crypt_mac.mm
diff --git a/components/os_crypt/os_crypt_mac.mm b/components/os_crypt/os_crypt_mac.mm
index 66f77c296754393677dac5350cf3b1b2e35d37ac..5b97726ae83f4ebe2b183446d3314fbbdd1f50b1 100644
--- a/components/os_crypt/os_crypt_mac.mm
+++ b/components/os_crypt/os_crypt_mac.mm
@@ -77,12 +77,10 @@ crypto::SymmetricKey* GetEncryptionKey() {
// Create an encryption key from our password and salt. The key is
// intentionally leaked.
- cached_encryption_key =
- crypto::SymmetricKey::DeriveKeyFromPassword(crypto::SymmetricKey::AES,
- password,
- salt,
- kEncryptionIterations,
- kDerivedKeySizeInBits);
+ cached_encryption_key = crypto::SymmetricKey::DeriveKeyFromPassword(
+ crypto::SymmetricKey::AES, password, salt,
+ kEncryptionIterations, kDerivedKeySizeInBits)
+ .release();
ANNOTATE_LEAKING_OBJECT_PTR(cached_encryption_key);
DCHECK(cached_encryption_key);
return cached_encryption_key;
« no previous file with comments | « components/crx_file/crx_file.cc ('k') | content/browser/download/base_file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698