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

Unified Diff: tools/gn/build_settings.cc

Issue 213353004: GN: Move towards only using / on Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: restore convert_slashes in output path, misc fixes Created 6 years, 9 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 | « base/files/file_path.cc ('k') | tools/gn/command_desc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/build_settings.cc
diff --git a/tools/gn/build_settings.cc b/tools/gn/build_settings.cc
index 7d1bcf0b2c9624169d358a193235507d9ed5531e..322e56a38163aae12e2be890a3cf840e763ac30c 100644
--- a/tools/gn/build_settings.cc
+++ b/tools/gn/build_settings.cc
@@ -26,12 +26,12 @@ BuildSettings::~BuildSettings() {
void BuildSettings::SetRootPath(const base::FilePath& r) {
DCHECK(r.value()[r.value().size() - 1] != base::FilePath::kSeparators[0]);
- root_path_ = r;
+ root_path_ = r.NormalizePathSeparatorsTo('/');
root_path_utf8_ = FilePathToUTF8(root_path_);
}
void BuildSettings::SetSecondarySourcePath(const SourceDir& d) {
- secondary_source_path_ = GetFullPath(d);
+ secondary_source_path_ = GetFullPath(d).NormalizePathSeparatorsTo('/');
}
void BuildSettings::SetBuildDir(const SourceDir& d) {
@@ -40,21 +40,21 @@ void BuildSettings::SetBuildDir(const SourceDir& d) {
}
base::FilePath BuildSettings::GetFullPath(const SourceFile& file) const {
- return file.Resolve(root_path_);
+ return file.Resolve(root_path_).NormalizePathSeparatorsTo('/');
}
base::FilePath BuildSettings::GetFullPath(const SourceDir& dir) const {
- return dir.Resolve(root_path_);
+ return dir.Resolve(root_path_).NormalizePathSeparatorsTo('/');
}
base::FilePath BuildSettings::GetFullPathSecondary(
const SourceFile& file) const {
- return file.Resolve(secondary_source_path_);
+ return file.Resolve(secondary_source_path_).NormalizePathSeparatorsTo('/');
}
base::FilePath BuildSettings::GetFullPathSecondary(
const SourceDir& dir) const {
- return dir.Resolve(secondary_source_path_);
+ return dir.Resolve(secondary_source_path_).NormalizePathSeparatorsTo('/');
}
void BuildSettings::ItemDefined(scoped_ptr<Item> item) const {
« no previous file with comments | « base/files/file_path.cc ('k') | tools/gn/command_desc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698