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

Unified Diff: chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc

Issue 2257103002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/auth/cryptohome_authenticator_unittest.cc
diff --git a/chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc b/chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc
index 5667ed2c75bd1b381b66e0bcaf0002a89b0de0a5..76f7ec632a5d7c81e02b43048016e496dcaa7729 100644
--- a/chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc
+++ b/chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc
@@ -765,9 +765,8 @@ TEST_F(CryptohomeAuthenticatorTest, DriveLoginWithPreHashedPassword) {
// pre-hashed key was used to create the cryptohome and allow a successful
// mount when this pre-hashed key is used.
- ExpectGetKeyDataExCall(
- base::WrapUnique(new int64_t(Key::KEY_TYPE_SALTED_SHA256)),
- base::WrapUnique(new std::string(kSalt)));
+ ExpectGetKeyDataExCall(base::MakeUnique<int64_t>(Key::KEY_TYPE_SALTED_SHA256),
+ base::MakeUnique<std::string>(kSalt));
ExpectMountExCall(false /* expect_create_attempt */);
auth_->AuthenticateToLogin(NULL, user_context_);
@@ -783,9 +782,8 @@ TEST_F(CryptohomeAuthenticatorTest, FailLoginWithMissingSalt) {
// Set up mock homedir methods to respond with key metadata indicating that a
// pre-hashed key was used to create the cryptohome but without the required
// salt.
- ExpectGetKeyDataExCall(
- base::WrapUnique(new int64_t(Key::KEY_TYPE_SALTED_SHA256)),
- std::unique_ptr<std::string>());
+ ExpectGetKeyDataExCall(base::MakeUnique<int64_t>(Key::KEY_TYPE_SALTED_SHA256),
+ std::unique_ptr<std::string>());
auth_->AuthenticateToLogin(NULL, user_context_);
base::RunLoop().Run();

Powered by Google App Engine
This is Rietveld 408576698