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

Unified Diff: tools/gn/analyzer.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 | « no previous file | tools/gn/command_desc.cc » ('j') | tools/gn/json_project_writer.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/analyzer.cc
diff --git a/tools/gn/analyzer.cc b/tools/gn/analyzer.cc
index 011b77baa77f9d725c0324c9cc4ab26a7fd0010d..06f93363b5b0b2e619b1638172e769091d1836af 100644
--- a/tools/gn/analyzer.cc
+++ b/tools/gn/analyzer.cc
@@ -102,7 +102,7 @@ std::vector<std::string> GetStringVector(const base::DictionaryValue& dict,
void WriteString(base::DictionaryValue& dict,
const std::string& key,
const std::string& value) {
- dict.SetString(key, value);
+ dict.SetStringWithoutPathExpansion(key, value);
};
void WriteLabels(const Label& default_toolchain,
@@ -115,7 +115,7 @@ void WriteLabels(const Label& default_toolchain,
strings.push_back(l.GetUserVisibleName(default_toolchain));
std::sort(strings.begin(), strings.end());
value->AppendStrings(strings);
- dict.Set(key, std::move(value));
+ dict.SetWithoutPathExpansion(key, std::move(value));
}
Label AbsoluteOrSourceAbsoluteStringToLabel(const Label& default_toolchain,
@@ -207,7 +207,8 @@ std::string OutputsToJSON(const Outputs& outputs,
if (outputs.compile_includes_all) {
auto compile_targets = base::WrapUnique(new base::ListValue());
compile_targets->AppendString("all");
- value->Set("compile_targets", std::move(compile_targets));
+ value->SetWithoutPathExpansion("compile_targets",
+ std::move(compile_targets));
} else {
WriteLabels(default_toolchain, *value, "compile_targets",
outputs.compile_labels);
« no previous file with comments | « no previous file | tools/gn/command_desc.cc » ('j') | tools/gn/json_project_writer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698