diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-06 12:07:59 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-06 12:07:59 +0000 |
commit | de34d5f905c326a42966f65ee127ad4d2b20f2d7 (patch) | |
tree | 8c0411345c3185b4fe459e39de0dd3d5b97a8557 | |
parent | bd0446b24b95dfa016b5a2336d1744fa03509b5c (diff) | |
download | chromium_src-de34d5f905c326a42966f65ee127ad4d2b20f2d7.zip chromium_src-de34d5f905c326a42966f65ee127ad4d2b20f2d7.tar.gz chromium_src-de34d5f905c326a42966f65ee127ad4d2b20f2d7.tar.bz2 |
base: Remove deprecated file_util::GetFilenameFromPath function.
BUG=24672
TEST=trybots
Review URL: http://codereview.chromium.org/6057010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70610 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/file_util.cc | 6 | ||||
-rw-r--r-- | base/file_util_deprecated.h | 5 | ||||
-rw-r--r-- | base/file_util_unittest.cc | 11 |
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; |