From 147ff124dd90f6d70f203cfe5c08816e3b533392 Mon Sep 17 00:00:00 2001 From: "tfarina@chromium.org" Date: Mon, 21 Jun 2010 03:05:19 +0000 Subject: Remove deprecated version of file_util::EndsWithSeparator. BUG=24672 TEST=out/Debug/base_unittests Review URL: http://codereview.chromium.org/2842015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50330 0039d316-1c4b-4281-b951-d872f2087c98 --- base/file_util.cc | 7 ++----- base/file_util_deprecated.h | 3 --- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/base/file_util.cc b/base/file_util.cc index 5ce4456..bae6535 100644 --- a/base/file_util.cc +++ b/base/file_util.cc @@ -358,7 +358,7 @@ void AppendToPath(std::wstring* path, const std::wstring& new_ending) { return; // Don't crash in this function in release builds. } - if (!EndsWithSeparator(*path)) + if (!EndsWithSeparator(FilePath(*path))) path->push_back(FilePath::kSeparators[0]); path->append(new_ending); } @@ -373,9 +373,6 @@ bool CopyDirectory(const std::wstring& from_path, const std::wstring& to_path, bool Delete(const std::wstring& path, bool recursive) { return Delete(FilePath::FromWStringHack(path), recursive); } -bool EndsWithSeparator(const std::wstring& path) { - return EndsWithSeparator(FilePath::FromWStringHack(path)); -} std::wstring GetFileExtensionFromPath(const std::wstring& path) { FilePath::StringType extension = GetFileExtensionFromPath(FilePath::FromWStringHack(path)); @@ -386,7 +383,7 @@ std::wstring GetFileExtensionFromPath(const std::wstring& path) { #endif } std::wstring GetFilenameFromPath(const std::wstring& path) { - if (path.empty() || EndsWithSeparator(path)) + if (path.empty() || EndsWithSeparator(FilePath::FromWStringHack(path))) return std::wstring(); return FilePath::FromWStringHack(path).BaseName().ToWStringHack(); diff --git a/base/file_util_deprecated.h b/base/file_util_deprecated.h index 28de811..6eae211 100644 --- a/base/file_util_deprecated.h +++ b/base/file_util_deprecated.h @@ -17,9 +17,6 @@ namespace file_util { -bool EndsWithSeparator(std::wstring* path); -bool EndsWithSeparator(const std::wstring& path); - // Use FilePath::DirName instead. void UpOneDirectory(std::wstring* dir); // Use FilePath::DirName instead. -- cgit v1.1