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

Unified Diff: tools/gn/filesystem_utils.cc

Issue 2265833002: Implement `gn analyze`. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/gn/filesystem_utils.cc
diff --git a/tools/gn/filesystem_utils.cc b/tools/gn/filesystem_utils.cc
index 6152ae04656a5b40a6adc58f1391da28bcb74849..f922968586f74b16f1f8dcaa026f46d6de824c83 100644
--- a/tools/gn/filesystem_utils.cc
+++ b/tools/gn/filesystem_utils.cc
@@ -754,6 +754,11 @@ bool WriteFileIfChanged(const base::FilePath& file_path,
if (ContentsEqual(file_path, data))
return true;
+ return WriteFile(file_path, data, err);
+}
+
+bool WriteFile(const base::FilePath& file_path, const std::string& data,
+ Err* err) {
// Create the directory if necessary.
if (!base::CreateDirectory(file_path.DirName())) {
if (err) {
« no previous file with comments | « tools/gn/filesystem_utils.h ('k') | tools/gn/gn.gyp » ('j') | tools/gn/graph.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698