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

Unified Diff: third_party/WebKit/Source/platform/exported/FilePathConversion.cpp

Issue 2586483002: Use explicit WebString <-> string16 conversion methods in storage API files (Closed)
Patch Set: '' Created 4 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
Index: third_party/WebKit/Source/platform/exported/FilePathConversion.cpp
diff --git a/third_party/WebKit/Source/platform/exported/FilePathConversion.cpp b/third_party/WebKit/Source/platform/exported/FilePathConversion.cpp
index bd394f38940b8b0dcbbc75bb4983eb4404180b6d..cf4efaeac0ce76de591730ad64b5527998ce6c8f 100644
--- a/third_party/WebKit/Source/platform/exported/FilePathConversion.cpp
+++ b/third_party/WebKit/Source/platform/exported/FilePathConversion.cpp
@@ -31,4 +31,15 @@ base::FilePath WebStringToFilePath(const WebString& webString) {
#endif
}
+WebString FilePathToWebString(const base::FilePath& path) {
+ if (path.empty())
+ return WebString();
+
+#if OS(POSIX)
+ return WebString::fromUTF8(path.value());
+#else
+ return WebString::fromUTF16(path.AsUTF16Unsafe());
+#endif
+}
+
} // namespace blink
« no previous file with comments | « content/child/webfileutilities_impl.cc ('k') | third_party/WebKit/Source/platform/exported/FilePathConversionTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698