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

Unified Diff: base/file_path.cc

Issue 16239: Add a method to explicitly request a UTF8 representation of a FilePath. This... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years 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') | no next file » | 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 7416)
+++ base/file_path.cc (working copy)
@@ -63,6 +63,15 @@
} // namespace
+const std::string FilePath::UTF8Value() const {
+#if defined(OS_POSIX)
+ // TODO(erikkay): I'm not sure how to make this code always correct for Linux.
darin (slow to review) 2008/12/23 20:23:55 this is precisely why this kind of function is pro
Avi (use Gerrit) 2008/12/23 22:58:49 There are cases where we need to have the path in
Erik does not do reviews 2008/12/23 23:02:04 Unfortunately, as Darin educated me here, this met
+ return path_;
+#elif defined(OS_WIN)
+ return WideToUTF8(path_);
+#endif
+}
+
bool FilePath::IsSeparator(CharType character) {
for (size_t i = 0; i < arraysize(kSeparators) - 1; ++i) {
if (character == kSeparators[i]) {
« no previous file with comments | « base/file_path.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698