Index: chrome/browser/content_settings/host_content_settings_map_unittest.cc |
diff --git a/chrome/browser/content_settings/host_content_settings_map_unittest.cc b/chrome/browser/content_settings/host_content_settings_map_unittest.cc |
index dd4e0f0cb309027b113ef5c4e3404f6de3566b8d..93378da804c657a62c67cc5617fda586913494b3 100644 |
--- a/chrome/browser/content_settings/host_content_settings_map_unittest.cc |
+++ b/chrome/browser/content_settings/host_content_settings_map_unittest.cc |
@@ -89,7 +89,8 @@ class TesterForType { |
} |
void SetPolicyDefault(ContentSetting setting) { |
- prefs_->SetManagedPref(policy_default_setting_, new base::Value(setting)); |
+ prefs_->SetManagedPref(policy_default_setting_, |
+ base::MakeUnique<base::Value>(setting)); |
} |
void AddUserException(std::string exception, |
@@ -1043,7 +1044,7 @@ TEST_F(HostContentSettingsMapTest, ManagedDefaultContentSetting) { |
// Set managed-default-content-setting through the coresponding preferences. |
prefs->SetManagedPref(prefs::kManagedDefaultJavaScriptSetting, |
- new base::Value(CONTENT_SETTING_BLOCK)); |
+ base::MakeUnique<base::Value>(CONTENT_SETTING_BLOCK)); |
EXPECT_EQ(CONTENT_SETTING_BLOCK, |
host_content_settings_map->GetDefaultContentSetting( |
CONTENT_SETTINGS_TYPE_JAVASCRIPT, NULL)); |
@@ -1057,7 +1058,7 @@ TEST_F(HostContentSettingsMapTest, ManagedDefaultContentSetting) { |
#if BUILDFLAG(ENABLE_PLUGINS) |
// Set preference to manage the default-content-setting for Plugins. |
prefs->SetManagedPref(prefs::kManagedDefaultPluginsSetting, |
- new base::Value(CONTENT_SETTING_BLOCK)); |
+ base::MakeUnique<base::Value>(CONTENT_SETTING_BLOCK)); |
EXPECT_EQ(CONTENT_SETTING_BLOCK, |
host_content_settings_map->GetDefaultContentSetting( |
CONTENT_SETTINGS_TYPE_PLUGINS, NULL)); |
@@ -1094,7 +1095,7 @@ TEST_F(HostContentSettingsMapTest, |
// Set managed-default-content-setting for content-settings-type JavaScript. |
prefs->SetManagedPref(prefs::kManagedDefaultJavaScriptSetting, |
- new base::Value(CONTENT_SETTING_ALLOW)); |
+ base::MakeUnique<base::Value>(CONTENT_SETTING_ALLOW)); |
EXPECT_EQ(CONTENT_SETTING_ALLOW, |
host_content_settings_map->GetContentSetting( |
host, host, CONTENT_SETTINGS_TYPE_JAVASCRIPT, std::string())); |
@@ -1131,7 +1132,7 @@ TEST_F(HostContentSettingsMapTest, |
// Set managed-default-content-settings-preferences. |
prefs->SetManagedPref(prefs::kManagedDefaultJavaScriptSetting, |
- new base::Value(CONTENT_SETTING_BLOCK)); |
+ base::MakeUnique<base::Value>(CONTENT_SETTING_BLOCK)); |
EXPECT_EQ(CONTENT_SETTING_BLOCK, |
host_content_settings_map->GetContentSetting( |
host, host, CONTENT_SETTINGS_TYPE_JAVASCRIPT, std::string())); |
@@ -1161,7 +1162,7 @@ TEST_F(HostContentSettingsMapTest, OverwrittenDefaultContentSetting) { |
// Set preference to manage the default-content-setting for Cookies. |
prefs->SetManagedPref(prefs::kManagedDefaultCookiesSetting, |
- new base::Value(CONTENT_SETTING_ALLOW)); |
+ base::MakeUnique<base::Value>(CONTENT_SETTING_ALLOW)); |
EXPECT_EQ(CONTENT_SETTING_ALLOW, |
host_content_settings_map->GetDefaultContentSetting( |
CONTENT_SETTINGS_TYPE_COOKIES, NULL)); |
@@ -1184,7 +1185,7 @@ TEST_F(HostContentSettingsMapTest, SettingDefaultContentSettingsWhenManaged) { |
profile.GetTestingPrefService(); |
prefs->SetManagedPref(prefs::kManagedDefaultCookiesSetting, |
- new base::Value(CONTENT_SETTING_ALLOW)); |
+ base::MakeUnique<base::Value>(CONTENT_SETTING_ALLOW)); |
EXPECT_EQ(CONTENT_SETTING_ALLOW, |
host_content_settings_map->GetDefaultContentSetting( |
CONTENT_SETTINGS_TYPE_COOKIES, NULL)); |