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

Unified Diff: services/preferences/tracked/pref_hash_filter_unittest.cc

Issue 2843813002: Remove SetWithoutPathExpansion (Closed)
Patch Set: Fix CrOS Error Created 3 years, 8 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
« no previous file with comments | « net/spdy/core/spdy_header_block.cc ('k') | tools/ipc_fuzzer/fuzzer/fuzzer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « net/spdy/core/spdy_header_block.cc ('k') | tools/ipc_fuzzer/fuzzer/fuzzer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698