0

CodeHealth: Remove use of DictionaryValue::SetWithoutPathExpansion

This change removes the use of DictionaryValue::SetWithoutPathExpansion
and replaces with Value::SetKey()

Bug: 1187031
Change-Id: Idb5b0edb01ad12543c45b5e63a363d0e533f7a74
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2892229
Auto-Submit: Fangzhen Song <songfangzhen@bytedance.com>
Commit-Queue: Fangzhen Song <songfangzhen@bytedance.com>
Reviewed-by: Finnur Thorarinsson <finnur@chromium.org>
Reviewed-by: Filip Gorski <fgorski@chromium.org>
Reviewed-by: Kyle Horimoto <khorimoto@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Josh Nohle <nohle@chromium.org>
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Xiaohui Chen <xiaohuic@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#883776}
This commit is contained in:
Song Fangzhen
2021-05-18 03:38:42 +00:00
committed by Chromium LUCI CQ
parent 622f4b014d
commit 3c83dc7901
58 changed files with 179 additions and 151 deletions
ash/wallpaper
base
chrome
chromeos
components
content/renderer
dbus
extensions
services/preferences
tools/json_schema_compiler/test

@ -35,8 +35,8 @@ std::string BuildResponse(bool is_porn) {
classification_dict->SetBoolean("pornography", is_porn);
auto classifications_list = std::make_unique<base::ListValue>();
classifications_list->Append(std::move(classification_dict));
dict.SetWithoutPathExpansion("classifications",
std::move(classifications_list));
dict.SetKey("classifications",
base::Value::FromUniquePtrValue(std::move(classifications_list)));
std::string result;
base::JSONWriter::Write(dict, &result);
return result;

@ -29,8 +29,8 @@ std::string BuildResponse(bool is_porn) {
classification_dict->SetBoolean("pornography", is_porn);
auto classifications_list = std::make_unique<base::ListValue>();
classifications_list->Append(std::move(classification_dict));
dict.SetWithoutPathExpansion("classifications",
std::move(classifications_list));
dict.SetKey("classifications",
base::Value::FromUniquePtrValue(std::move(classifications_list)));
std::string result;
base::JSONWriter::Write(dict, &result);
return result;