Index: webkit/fileapi/file_system_util.cc |
diff --git a/webkit/fileapi/file_system_util.cc b/webkit/fileapi/file_system_util.cc |
index c5a30473de1fa596ae35ef5902a2b0abf44aaff3..ab145f1592e596f7fbdc9a05d631fa65a01b2a7e 100644 |
--- a/webkit/fileapi/file_system_util.cc |
+++ b/webkit/fileapi/file_system_util.cc |
@@ -224,4 +224,20 @@ std::string GetFileSystemTypeString(FileSystemType type) { |
} |
} |
+std::string FilePathToString(const FilePath& file_path) { |
+#if defined(OS_WIN) |
+ return UTF16ToUTF8(file_path.value()); |
+#elif defined(OS_POSIX) |
+ return file_path.value(); |
+#endif |
+} |
+ |
+FilePath StringToFilePath(const std::string& file_path_string) { |
+#if defined(OS_WIN) |
+ return FilePath(UTF8ToUTF16(file_path_string)); |
+#elif defined(OS_POSIX) |
+ return FilePath(file_path_string); |
+#endif |
+} |
+ |
} // namespace fileapi |