Use FilePath::DirName instead of the deprecated file_util::GetDirectoryFromPath.
Fix the callers and remove the deprecated function.
BUG=24672
TEST=trybots
Review URL: http://codereview.chromium.org/6111003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70705 0039d316-1c4b-4281-b951-d872f2087c98
CrOS-Libchrome-Original-Commit: 15e093c9972a9ab2c7dedf23e8a8766fdfc3a41d
diff --git a/base/file_util_deprecated.h b/base/file_util_deprecated.h
index bb8f7f9..dac4b45 100644
--- a/base/file_util_deprecated.h
+++ b/base/file_util_deprecated.h
@@ -27,18 +27,6 @@
FILE* OpenFile(const std::string& filename, const char* mode);
FILE* OpenFile(const std::wstring& filename, const char* mode);
-// Returns the directory component of a path, without the trailing
-// path separator, or an empty string on error. The function does not
-// check for the existence of the path, so if it is passed a directory
-// without the trailing \, it will interpret the last component of the
-// path as a file and chomp it. This does not support relative paths.
-// Examples:
-// path == "C:\pics\jojo.jpg", returns "C:\pics"
-// path == "C:\Windows\system32\", returns "C:\Windows\system32"
-// path == "C:\Windows\system32", returns "C:\Windows"
-// Deprecated. Use FilePath's DirName() instead.
-std::wstring GetDirectoryFromPath(const std::wstring& path);
-
// Appends new_ending to path, adding a separator between the two if necessary.
void AppendToPath(std::wstring* path, const std::wstring& new_ending);
diff --git a/base/file_util_unittest.cc b/base/file_util_unittest.cc
index fa00fcf..bbd888a 100644
--- a/base/file_util_unittest.cc
+++ b/base/file_util_unittest.cc
@@ -315,18 +315,6 @@
#endif
};
-#if defined(OS_WIN)
-// This function is deprecated, and only exists on Windows anymore.
-TEST_F(FileUtilTest, GetDirectoryFromPath) {
- for (unsigned int i = 0; i < arraysize(dir_cases); ++i) {
- const dir_case& dir = dir_cases[i];
- const std::wstring parent =
- file_util::GetDirectoryFromPath(dir.full_path);
- EXPECT_EQ(dir.directory, parent);
- }
-}
-#endif
-
// Flaky, http://crbug.com/46246
TEST_F(FileUtilTest, FLAKY_CountFilesCreatedAfter) {
// Create old file (that we don't want to count)