Index: chrome/browser/password_manager/chrome_password_manager_client_unittest.cc |
diff --git a/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc b/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc |
index 19fd0840d5e2dd33e041026b277412d6d8f6a753..9b602a23f1bc016ba24556d2af8b098b74fdbd52 100644 |
--- a/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc |
+++ b/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc |
@@ -10,6 +10,7 @@ |
#include "base/command_line.h" |
#include "base/macros.h" |
+#include "base/memory/ptr_util.h" |
#include "base/metrics/field_trial.h" |
#include "base/run_loop.h" |
#include "base/strings/string16.h" |
@@ -307,10 +308,10 @@ TEST_F(ChromePasswordManagerClientTest, |
// preference. |
ChromePasswordManagerClient* client = GetClient(); |
prefs()->SetUserPref(password_manager::prefs::kCredentialsEnableService, |
- new base::Value(true)); |
+ base::MakeUnique<base::Value>(true)); |
EXPECT_TRUE(client->IsSavingAndFillingEnabledForCurrentPage()); |
prefs()->SetUserPref(password_manager::prefs::kCredentialsEnableService, |
- new base::Value(false)); |
+ base::MakeUnique<base::Value>(false)); |
EXPECT_FALSE(client->IsSavingAndFillingEnabledForCurrentPage()); |
} |
@@ -329,7 +330,7 @@ TEST_F(ChromePasswordManagerClientTest, SavingAndFillingEnabledConditionsTest) { |
// Functionality disabled if there are SSL errors and the manager itself is |
// disabled. |
prefs()->SetUserPref(password_manager::prefs::kCredentialsEnableService, |
- new base::Value(false)); |
+ base::MakeUnique<base::Value>(false)); |
EXPECT_FALSE(client->IsSavingAndFillingEnabledForCurrentPage()); |
EXPECT_FALSE(client->IsFillingEnabledForCurrentPage()); |
@@ -338,7 +339,7 @@ TEST_F(ChromePasswordManagerClientTest, SavingAndFillingEnabledConditionsTest) { |
EXPECT_CALL(*client, DidLastPageLoadEncounterSSLErrors()) |
.WillRepeatedly(Return(false)); |
prefs()->SetUserPref(password_manager::prefs::kCredentialsEnableService, |
- new base::Value(false)); |
+ base::MakeUnique<base::Value>(false)); |
EXPECT_FALSE(client->IsSavingAndFillingEnabledForCurrentPage()); |
EXPECT_TRUE(client->IsFillingEnabledForCurrentPage()); |
@@ -347,7 +348,7 @@ TEST_F(ChromePasswordManagerClientTest, SavingAndFillingEnabledConditionsTest) { |
EXPECT_CALL(*client, DidLastPageLoadEncounterSSLErrors()) |
.WillRepeatedly(Return(false)); |
prefs()->SetUserPref(password_manager::prefs::kCredentialsEnableService, |
- new base::Value(true)); |
+ base::MakeUnique<base::Value>(true)); |
EXPECT_TRUE(client->IsSavingAndFillingEnabledForCurrentPage()); |
EXPECT_TRUE(client->IsFillingEnabledForCurrentPage()); |
@@ -359,7 +360,7 @@ TEST_F(ChromePasswordManagerClientTest, SavingAndFillingEnabledConditionsTest) { |
// Functionality disabled in Incognito mode also when manager itself is |
// enabled. |
prefs()->SetUserPref(password_manager::prefs::kCredentialsEnableService, |
- new base::Value(true)); |
+ base::MakeUnique<base::Value>(true)); |
EXPECT_FALSE(client->IsSavingAndFillingEnabledForCurrentPage()); |
EXPECT_TRUE(client->IsFillingEnabledForCurrentPage()); |
profile()->ForceIncognito(false); |