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

Unified Diff: chrome/browser/signin/signin_manager_unittest.cc

Issue 2014103002: Remove deprecated ListValue::Append(Value*) overload on Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ADL fail Created 4 years, 3 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/signin/signin_manager_unittest.cc
diff --git a/chrome/browser/signin/signin_manager_unittest.cc b/chrome/browser/signin/signin_manager_unittest.cc
index a8b3e883183a450ac4aaf7922f76cfde246b3f5c..22b8bf3f16883e28263ac93d38e391af68475a42 100644
--- a/chrome/browser/signin/signin_manager_unittest.cc
+++ b/chrome/browser/signin/signin_manager_unittest.cc
@@ -11,6 +11,7 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/compiler_specific.h"
+#include "base/memory/ptr_util.h"
#include "base/run_loop.h"
#include "base/strings/stringprintf.h"
#include "chrome/browser/browser_process.h"
@@ -505,11 +506,11 @@ TEST_F(SigninManagerTest, GaiaIdMigration) {
ListPrefUpdate update(client_prefs,
AccountTrackerService::kAccountInfoPref);
update->Clear();
- base::DictionaryValue* dict = new base::DictionaryValue();
- update->Append(dict);
+ auto dict = base::MakeUnique<base::DictionaryValue>();
dict->SetString("account_id", base::UTF8ToUTF16(email));
dict->SetString("email", base::UTF8ToUTF16(email));
dict->SetString("gaia", base::UTF8ToUTF16(gaia_id));
+ update->Append(std::move(dict));
tracker->Shutdown();
tracker->Initialize(signin_client());
@@ -539,11 +540,11 @@ TEST_F(SigninManagerTest, VeryOldProfileGaiaIdMigration) {
ListPrefUpdate update(client_prefs,
AccountTrackerService::kAccountInfoPref);
update->Clear();
- base::DictionaryValue* dict = new base::DictionaryValue();
- update->Append(dict);
+ auto dict = base::MakeUnique<base::DictionaryValue>();
dict->SetString("account_id", base::UTF8ToUTF16(email));
dict->SetString("email", base::UTF8ToUTF16(email));
dict->SetString("gaia", base::UTF8ToUTF16(gaia_id));
+ update->Append(std::move(dict));
tracker->Shutdown();
tracker->Initialize(signin_client());
@@ -574,11 +575,11 @@ TEST_F(SigninManagerTest, GaiaIdMigrationCrashInTheMiddle) {
ListPrefUpdate update(client_prefs,
AccountTrackerService::kAccountInfoPref);
update->Clear();
- base::DictionaryValue* dict = new base::DictionaryValue();
- update->Append(dict);
+ auto dict = base::MakeUnique<base::DictionaryValue>();
dict->SetString("account_id", base::UTF8ToUTF16(email));
dict->SetString("email", base::UTF8ToUTF16(email));
dict->SetString("gaia", base::UTF8ToUTF16(gaia_id));
+ update->Append(std::move(dict));
tracker->Shutdown();
tracker->Initialize(signin_client());

Powered by Google App Engine
This is Rietveld 408576698