FilePath: remove some functions that aren't really used.
And fix the one caller.
Review URL: http://codereview.chromium.org/7087009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87327 0039d316-1c4b-4281-b951-d872f2087c98
CrOS-Libchrome-Original-Commit: 8ce9e490f79236a93767ab3e153995e9c19735dd
diff --git a/base/file_path.cc b/base/file_path.cc
index 0d0b40b..35361be 100644
--- a/base/file_path.cc
+++ b/base/file_path.cc
@@ -551,41 +551,24 @@
}
#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);
-#else
- NOTIMPLEMENTED() << "Impossible encoding situation!";
-#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))
- return false;
-#else
- NOTIMPLEMENTED() << "Impossible encoding situation!";
- return false;
-#endif
-
- return true;
-}
-
void FilePath::WriteToPickle(Pickle* pickle) {
- WriteStringTypeToPickle(pickle, value());
+#if defined(OS_WIN)
+ pickle->WriteString16(path_);
+#else
+ pickle->WriteString(path_);
+#endif
}
bool FilePath::ReadFromPickle(Pickle* pickle, void** iter) {
- return ReadStringTypeFromPickle(pickle, iter, &path_);
+#if defined(OS_WIN)
+ if (!pickle->ReadString16(iter, &path_))
+ return false;
+#else
+ if (!pickle->ReadString(iter, &path_))
+ return false;
+#endif
+
+ return true;
}
#if defined(OS_WIN)