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

Unified Diff: base/file_path.cc

Issue 7087009: FilePath: remove some functions that aren't really used. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: simpler Created 9 years, 7 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: base/file_path.cc
diff --git a/base/file_path.cc b/base/file_path.cc
index 0d0b40b400402272a2a06725d11b63d7629901a3..35361bef7594c5e2223343d46d4ec745edec3675 100644
--- a/base/file_path.cc
+++ b/base/file_path.cc
@@ -551,43 +551,26 @@ FilePath FilePath::FromWStringHack(const std::wstring& wstring) {
}
#endif
-// static.
-void FilePath::WriteStringTypeToPickle(Pickle* pickle,
- const StringType& path) {
-#if defined(WCHAR_T_IS_UTF16)
- pickle->WriteWString(path);
-#elif defined(WCHAR_T_IS_UTF32)
- pickle->WriteString(path);
+void FilePath::WriteToPickle(Pickle* pickle) {
+#if defined(OS_WIN)
+ pickle->WriteString16(path_);
#else
- NOTIMPLEMENTED() << "Impossible encoding situation!";
+ pickle->WriteString(path_);
#endif
}
-// static.
-bool FilePath::ReadStringTypeFromPickle(Pickle* pickle, void** iter,
- StringType* path) {
-#if defined(WCHAR_T_IS_UTF16)
- if (!pickle->ReadWString(iter, path))
- return false;
-#elif defined(WCHAR_T_IS_UTF32)
- if (!pickle->ReadString(iter, path))
+bool FilePath::ReadFromPickle(Pickle* pickle, void** iter) {
+#if defined(OS_WIN)
+ if (!pickle->ReadString16(iter, &path_))
return false;
#else
- NOTIMPLEMENTED() << "Impossible encoding situation!";
- return false;
+ if (!pickle->ReadString(iter, &path_))
+ return false;
#endif
return true;
}
-void FilePath::WriteToPickle(Pickle* pickle) {
- WriteStringTypeToPickle(pickle, value());
-}
-
-bool FilePath::ReadFromPickle(Pickle* pickle, void** iter) {
- return ReadStringTypeFromPickle(pickle, iter, &path_);
-}
-
#if defined(OS_WIN)
// Windows specific implementation of file string comparisons

Powered by Google App Engine
This is Rietveld 408576698