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

Unified Diff: base/file_path.cc

Issue 18134: Add AppendASCII (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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/file_path.h ('k') | base/file_path_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_path.cc
===================================================================
--- base/file_path.cc (revision 8363)
+++ base/file_path.cc (working copy)
@@ -252,6 +252,15 @@
return Append(component.value());
}
+FilePath FilePath::AppendASCII(const std::string& component) const {
+ DCHECK(IsStringASCII(component));
+#if defined(OS_WIN)
+ return Append(ASCIIToWide(component));
+#elif defined(OS_POSIX)
+ return Append(component);
+#endif
+}
+
bool FilePath::IsAbsolute() const {
return IsPathAbsolute(path_);
}
« no previous file with comments | « base/file_path.h ('k') | base/file_path_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698