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

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: only generate / in various places 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
Index: tools/gn/build_settings.cc
diff --git a/tools/gn/build_settings.cc b/tools/gn/build_settings.cc
index 7d1bcf0b2c9624169d358a193235507d9ed5531e..77f70fe7cd2c36aa6d40c7910e76b0486f3d6f20 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(L'/');
brettw 2014/04/02 17:34:28 I don't normally use L for ASCII characters. Bare
scottmg 2014/04/02 20:20:19 Done.
root_path_utf8_ = FilePathToUTF8(root_path_);
}
void BuildSettings::SetSecondarySourcePath(const SourceDir& d) {
- secondary_source_path_ = GetFullPath(d);
+ secondary_source_path_ = GetFullPath(d).NormalizePathSeparatorsTo(L'/');
}
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(L'/');
}
base::FilePath BuildSettings::GetFullPath(const SourceDir& dir) const {
- return dir.Resolve(root_path_);
+ return dir.Resolve(root_path_).NormalizePathSeparatorsTo(L'/');
}
base::FilePath BuildSettings::GetFullPathSecondary(
const SourceFile& file) const {
- return file.Resolve(secondary_source_path_);
+ return file.Resolve(secondary_source_path_).NormalizePathSeparatorsTo(L'/');
}
base::FilePath BuildSettings::GetFullPathSecondary(
const SourceDir& dir) const {
- return dir.Resolve(secondary_source_path_);
+ return dir.Resolve(secondary_source_path_).NormalizePathSeparatorsTo(L'/');
}
void BuildSettings::ItemDefined(scoped_ptr<Item> item) const {
« base/files/file_path.cc ('K') | « 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