summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
Diffstat (limited to 'base')
-rw-r--r--base/file_util.cc6
-rw-r--r--base/file_util_deprecated.h5
-rw-r--r--base/file_util_unittest.cc11
3 files changed, 1 insertions, 21 deletions
diff --git a/base/file_util.cc b/base/file_util.cc
index 2b5dc84..d1a46c9 100644
--- a/base/file_util.cc
+++ b/base/file_util.cc
@@ -386,12 +386,6 @@ std::wstring GetFileExtensionFromPath(const std::wstring& path) {
GetFileExtensionFromPath(FilePath::FromWStringHack(path));
return extension;
}
-std::wstring GetFilenameFromPath(const std::wstring& path) {
- if (path.empty() || EndsWithSeparator(FilePath::FromWStringHack(path)))
- return std::wstring();
-
- return FilePath::FromWStringHack(path).BaseName().ToWStringHack();
-}
FILE* OpenFile(const std::wstring& filename, const char* mode) {
return OpenFile(FilePath::FromWStringHack(filename), mode);
}
diff --git a/base/file_util_deprecated.h b/base/file_util_deprecated.h
index 9bafb31..bb8f7f9 100644
--- a/base/file_util_deprecated.h
+++ b/base/file_util_deprecated.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -27,9 +27,6 @@ namespace file_util {
FILE* OpenFile(const std::string& filename, const char* mode);
FILE* OpenFile(const std::wstring& filename, const char* mode);
-// Use FilePath::BaseName instead.
-std::wstring GetFilenameFromPath(const std::wstring& path);
-
// 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
diff --git a/base/file_util_unittest.cc b/base/file_util_unittest.cc
index 4aaed90..fa00fcf 100644
--- a/base/file_util_unittest.cc
+++ b/base/file_util_unittest.cc
@@ -251,17 +251,6 @@ static const struct filename_case {
#endif
};
-#if defined(OS_WIN)
-// This function is deprecated on non-Windows.
-TEST_F(FileUtilTest, GetFilenameFromPath) {
- for (unsigned int i = 0; i < arraysize(filename_cases); ++i) {
- const filename_case& value = filename_cases[i];
- std::wstring result = file_util::GetFilenameFromPath(value.path);
- EXPECT_EQ(value.filename, result);
- }
-}
-#endif
-
// Test finding the file type from a path name
static const struct extension_case {
const wchar_t* path;