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

Unified Diff: chrome/browser/chromeos/login/easy_unlock/easy_unlock_create_keys_operation.cc

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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/login/easy_unlock/easy_unlock_create_keys_operation.cc
diff --git a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_create_keys_operation.cc b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_create_keys_operation.cc
index 360e825ed2963f0f64888f4e5991005da1d6122a..5a27a30801172e2d6ce4e5714a23c31d50a5e5cf 100644
--- a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_create_keys_operation.cc
+++ b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_create_keys_operation.cc
@@ -6,13 +6,13 @@
#include <stdint.h>
+#include <memory>
#include <string>
#include "base/base64url.h"
#include "base/bind.h"
#include "base/logging.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/strings/string_util.h"
#include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_key_manager.h"
#include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_types.h"
@@ -272,7 +272,7 @@ void EasyUnlockCreateKeysOperation::CreateKeyForDeviceAtIndex(size_t index) {
crypto::RandBytes(base::WriteInto(&user_key, kUserKeyByteSize + 1),
kUserKeyByteSize);
- scoped_ptr<crypto::SymmetricKey> session_key(
+ std::unique_ptr<crypto::SymmetricKey> session_key(
crypto::SymmetricKey::GenerateRandomKey(crypto::SymmetricKey::AES,
kSessionKeyByteSize * 8));
@@ -357,7 +357,7 @@ void EasyUnlockCreateKeysOperation::OnGetSystemSalt(
// Add cryptohome key.
const cryptohome::Identification id(user_context_.GetAccountId());
- scoped_ptr<Key> auth_key(new Key(*user_context_.GetKey()));
+ std::unique_ptr<Key> auth_key(new Key(*user_context_.GetKey()));
if (auth_key->GetKeyType() == Key::KEY_TYPE_PASSWORD_PLAIN)
auth_key->Transform(Key::KEY_TYPE_SALTED_SHA256_TOP_HALF, system_salt);

Powered by Google App Engine
This is Rietveld 408576698