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

Unified Diff: tools/ipc_fuzzer/fuzzer/fuzzer.cc

Issue 2884933002: Remove raw base::DictionaryValue::SetWithoutPathExpansion (Closed)
Patch Set: Include Created 3 years, 7 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: tools/ipc_fuzzer/fuzzer/fuzzer.cc
diff --git a/tools/ipc_fuzzer/fuzzer/fuzzer.cc b/tools/ipc_fuzzer/fuzzer/fuzzer.cc
index a8d3c6c4f3801901bf88ad6839c9abca5a47afdd..5474ba84ad1ab99a6792e63414416e6504d4eef4 100644
--- a/tools/ipc_fuzzer/fuzzer/fuzzer.cc
+++ b/tools/ipc_fuzzer/fuzzer/fuzzer.cc
@@ -590,25 +590,25 @@ struct FuzzTraits<base::DictionaryValue> {
case base::Value::Type::BOOLEAN: {
bool tmp;
fuzzer->FuzzBool(&tmp);
- p->SetWithoutPathExpansion(property, new base::Value(tmp));
+ p->SetBooleanWithoutPathExpansion(property, tmp);
break;
}
case base::Value::Type::INTEGER: {
int tmp;
fuzzer->FuzzInt(&tmp);
- p->SetWithoutPathExpansion(property, new base::Value(tmp));
+ p->SetIntegerWithoutPathExpansion(property, tmp);
break;
}
case base::Value::Type::DOUBLE: {
double tmp;
fuzzer->FuzzDouble(&tmp);
- p->SetWithoutPathExpansion(property, new base::Value(tmp));
+ p->SetDoubleWithoutPathExpansion(property, tmp);
break;
}
case base::Value::Type::STRING: {
std::string tmp;
fuzzer->FuzzString(&tmp);
- p->SetWithoutPathExpansion(property, new base::Value(tmp));
+ p->SetStringWithoutPathExpansion(property, tmp);
break;
}
case base::Value::Type::BINARY: {
@@ -620,15 +620,15 @@ struct FuzzTraits<base::DictionaryValue> {
break;
}
case base::Value::Type::DICTIONARY: {
- base::DictionaryValue* tmp = new base::DictionaryValue();
- FuzzParam(tmp, fuzzer);
- p->SetWithoutPathExpansion(property, tmp);
+ auto tmp = base::MakeUnique<base::DictionaryValue>();
+ FuzzParam(tmp.get(), fuzzer);
+ p->SetWithoutPathExpansion(property, std::move(tmp));
break;
}
case base::Value::Type::LIST: {
- base::ListValue* tmp = new base::ListValue();
- FuzzParam(tmp, fuzzer);
- p->SetWithoutPathExpansion(property, tmp);
+ auto tmp = base::MakeUnique<base::ListValue>();
+ FuzzParam(tmp.get(), fuzzer);
+ p->SetWithoutPathExpansion(property, std::move(tmp));
break;
}
case base::Value::Type::NONE:
« no previous file with comments | « services/preferences/tracked/pref_hash_filter_unittest.cc ('k') | tools/json_schema_compiler/test/choices_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698