Re-try r29078: Remove some deprecated file_util wstring functions.
With the previous patch, the try bots failed with mysterious messages, so I ignored them, patched it into my windows box and tested it there manually, and found no problems. As it turns out, the try failures were real :(. But nsylvain and I found the problem: the behavior of file_util::GetDirectoryFromPath() differs from DirName() when the path is empty (officially, GetDirectoryFromPath is not supposed to support non-absolute paths, but that is not enforced).
Here is a green win try result: http://build.chromium.org/buildbot/try-server/builders/win/builds/3705
mac: http://build.chromium.org/buildbot/try-server/builders/mac/builds/3491
linux: http://build.chromium.org/buildbot/try-server/builders/linux/builds/3466
I also applied this patch locally in Windows to test that it doesn't break the chrome frame compile or tests, since that's not covered by the trybots yet.
Review URL: http://codereview.chromium.org/271099
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29094 0039d316-1c4b-4281-b951-d872f2087c98
CrOS-Libchrome-Original-Commit: 66ff7356a381d6c8c6c3272b095938408c4f3188
diff --git a/base/file_util.cc b/base/file_util.cc
index 9976d88..4cde773 100644
--- a/base/file_util.cc
+++ b/base/file_util.cc
@@ -317,10 +317,6 @@
return ContentsEqual(FilePath::FromWStringHack(filename1),
FilePath::FromWStringHack(filename2));
}
-bool CopyFile(const std::wstring& from_path, const std::wstring& to_path) {
- return CopyFile(FilePath::FromWStringHack(from_path),
- FilePath::FromWStringHack(to_path));
-}
bool CreateDirectory(const std::wstring& full_path) {
return CreateDirectory(FilePath::FromWStringHack(full_path));
}
@@ -340,9 +336,6 @@
bool Delete(const std::wstring& path, bool recursive) {
return Delete(FilePath::FromWStringHack(path), recursive);
}
-bool DirectoryExists(const std::wstring& path) {
- return DirectoryExists(FilePath::FromWStringHack(path));
-}
bool EndsWithSeparator(std::wstring* path) {
return EndsWithSeparator(FilePath::FromWStringHack(*path));
}
@@ -384,16 +377,9 @@
*path_str = path.ToWStringHack();
return true;
}
-bool Move(const std::wstring& from_path, const std::wstring& to_path) {
- return Move(FilePath::FromWStringHack(from_path),
- FilePath::FromWStringHack(to_path));
-}
FILE* OpenFile(const std::wstring& filename, const char* mode) {
return OpenFile(FilePath::FromWStringHack(filename), mode);
}
-bool PathExists(const std::wstring& path) {
- return PathExists(FilePath::FromWStringHack(path));
-}
int ReadFile(const std::wstring& filename, char* data, int size) {
return ReadFile(FilePath::FromWStringHack(filename), data, size);
}
diff --git a/base/file_util.h b/base/file_util.h
index 93fdd4e..9a590a4 100644
--- a/base/file_util.h
+++ b/base/file_util.h
@@ -128,8 +128,6 @@
// on different volumes, this will attempt to copy and delete. Returns
// true for success.
bool Move(const FilePath& from_path, const FilePath& to_path);
-// Deprecated temporary compatibility function.
-bool Move(const std::wstring& from_path, const std::wstring& to_path);
// Renames file |from_path| to |to_path|. Both paths must be on the same
// volume, or the function will fail. Destination file will be created
@@ -140,8 +138,6 @@
// Copies a single file. Use CopyDirectory to copy directories.
bool CopyFile(const FilePath& from_path, const FilePath& to_path);
-// Deprecated temporary compatibility function.
-bool CopyFile(const std::wstring& from_path, const std::wstring& to_path);
// Copies the given path, and optionally all subdirectories and their contents
// as well.
@@ -159,16 +155,12 @@
// Returns true if the given path exists on the local filesystem,
// false otherwise.
bool PathExists(const FilePath& path);
-// Deprecated temporary compatibility function.
-bool PathExists(const std::wstring& path);
// Returns true if the given path is writable by the user, false otherwise.
bool PathIsWritable(const FilePath& path);
// Returns true if the given path exists and is a directory, false otherwise.
bool DirectoryExists(const FilePath& path);
-// Deprecated temporary compatibility function.
-bool DirectoryExists(const std::wstring& path);
#if defined(OS_WIN)
// Gets the creation time of the given file (expressed in the local timezone),