summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-21 17:49:31 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-21 17:49:31 +0000
commit5eb8eda69177fbc7013aaf009deb6f77e30799ac (patch)
tree80b635c5da2e54be2862150b57f4666541022fb6 /net
parentbed9bd6cf3f489a1abf040accca3011b170cb471 (diff)
downloadchromium_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.cc9
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()) {