diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-21 17:49:31 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-21 17:49:31 +0000 |
commit | 5eb8eda69177fbc7013aaf009deb6f77e30799ac (patch) | |
tree | 80b635c5da2e54be2862150b57f4666541022fb6 /net | |
parent | bed9bd6cf3f489a1abf040accca3011b170cb471 (diff) | |
download | chromium_src-5eb8eda69177fbc7013aaf009deb6f77e30799ac.zip chromium_src-5eb8eda69177fbc7013aaf009deb6f77e30799ac.tar.gz chromium_src-5eb8eda69177fbc7013aaf009deb6f77e30799ac.tar.bz2 |
Stop using deprecated file_util::Trim* functions.
Review URL: http://codereview.chromium.org/79053
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14121 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/disk_cache/backend_impl.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/disk_cache/backend_impl.cc b/net/disk_cache/backend_impl.cc index e1143ff..64955fc 100644 --- a/net/disk_cache/backend_impl.cc +++ b/net/disk_cache/backend_impl.cc @@ -4,6 +4,7 @@ #include "net/disk_cache/backend_impl.h" +#include "base/file_path.h" #include "base/file_util.h" #include "base/histogram.h" #include "base/message_loop.h" @@ -109,11 +110,11 @@ std::wstring GetTempCacheName(const std::wstring& path, // Moves the cache files to a new folder and creates a task to delete them. bool DelayedCacheCleanup(const std::wstring& full_path) { - std::wstring path(full_path); - file_util::TrimTrailingSeparator(&path); + FilePath current_path = FilePath::FromWStringHack(full_path); + current_path = current_path.StripTrailingSeparators(); - std::wstring name = file_util::GetFilenameFromPath(path); - file_util::TrimFilename(&path); + std::wstring path = current_path.DirName().ToWStringHack(); + std::wstring name = current_path.BaseName().ToWStringHack(); std::wstring to_delete = GetTempCacheName(path, name); if (to_delete.empty()) { |