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

Unified Diff: tools/gn/json_project_writer.cc

Issue 2363193002: Use WithoutPathExpansion on DictionaryValue in GN. (Closed)
Patch Set: Created 4 years, 3 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 | « tools/gn/desc_builder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/json_project_writer.cc
diff --git a/tools/gn/json_project_writer.cc b/tools/gn/json_project_writer.cc
index 67c21ee2d7f68eebeb79abcf6945373d1fd80eed..44576cdcdd608d57b0b64c994b5c80e4f69552da 100644
--- a/tools/gn/json_project_writer.cc
+++ b/tools/gn/json_project_writer.cc
@@ -100,19 +100,23 @@ std::string RenderJSON(const BuildSettings* build_settings,
!outputs_value->empty()) {
description->MergeDictionary(outputs.get());
}
- targets->Set(target->label().GetUserVisibleName(default_toolchain_label),
- std::move(description));
bungeman-chromium 2016/09/23 22:26:00 This 'Set' appears to be the one causing the issue
+ targets->SetWithoutPathExpansion(
+ target->label().GetUserVisibleName(default_toolchain_label),
+ std::move(description));
}
auto settings = base::MakeUnique<base::DictionaryValue>();
- settings->SetString("root_path", build_settings->root_path_utf8());
- settings->SetString("build_dir", build_settings->build_dir().value());
- settings->SetString("default_toolchain",
- default_toolchain_label.GetUserVisibleName(false));
+ settings->SetStringWithoutPathExpansion("root_path",
+ build_settings->root_path_utf8());
+ settings->SetStringWithoutPathExpansion("build_dir",
+ build_settings->build_dir().value());
+ settings->SetStringWithoutPathExpansion(
+ "default_toolchain",
+ default_toolchain_label.GetUserVisibleName(false));
auto output = base::MakeUnique<base::DictionaryValue>();
- output->Set("targets", std::move(targets));
- output->Set("build_settings", std::move(settings));
+ output->SetWithoutPathExpansion("targets", std::move(targets));
+ output->SetWithoutPathExpansion("build_settings", std::move(settings));
std::string s;
base::JSONWriter::WriteWithOptions(
« no previous file with comments | « tools/gn/desc_builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698