Index: services/preferences/tracked/pref_hash_filter_unittest.cc |
diff --git a/services/preferences/tracked/pref_hash_filter_unittest.cc b/services/preferences/tracked/pref_hash_filter_unittest.cc |
index 5c288dcc77d07ad446af259f021c4531c04bb14b..6bb6d0c0ea5884dc10a12197cf1d13879b239895 100644 |
--- a/services/preferences/tracked/pref_hash_filter_unittest.cc |
+++ b/services/preferences/tracked/pref_hash_filter_unittest.cc |
@@ -409,8 +409,9 @@ class MockHashStoreContents : public HashStoreContents { |
base::DictionaryValue* mac_dict = nullptr; |
dictionary_.GetDictionaryWithoutPathExpansion(path, &mac_dict); |
if (!mac_dict) { |
- mac_dict = new base::DictionaryValue; |
- dictionary_.SetWithoutPathExpansion(path, mac_dict); |
+ dictionary_.SetWithoutPathExpansion( |
+ path, base::MakeUnique<base::DictionaryValue>()); |
+ dictionary_.GetDictionaryWithoutPathExpansion(path, &mac_dict); |
} |
mac_dict->SetStringWithoutPathExpansion(split_path, mac); |
} |