diff options
author | nsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-02 04:07:23 +0000 |
---|---|---|
committer | nsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-02 04:07:23 +0000 |
commit | 56e1e0f7c2ba0a7b6a821ef55c1e89ad1d96ed50 (patch) | |
tree | 69f16777b629ea71681a014be7775bed36b52a55 /net/disk_cache/cache_util_posix.cc | |
parent | d465a6591941e68f981dd4278965cb2e7bce2537 (diff) | |
download | chromium_src-56e1e0f7c2ba0a7b6a821ef55c1e89ad1d96ed50.zip chromium_src-56e1e0f7c2ba0a7b6a821ef55c1e89ad1d96ed50.tar.gz chromium_src-56e1e0f7c2ba0a7b6a821ef55c1e89ad1d96ed50.tar.bz2 |
Change NOTREACHED for a LOG(WARNING) when we can't delete
the cache. This should help the unit tests.
BUG:38562
Review URL: http://codereview.chromium.org/1594002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43446 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/cache_util_posix.cc')
-rw-r--r-- | net/disk_cache/cache_util_posix.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/net/disk_cache/cache_util_posix.cc b/net/disk_cache/cache_util_posix.cc index a272cb8..b393747 100644 --- a/net/disk_cache/cache_util_posix.cc +++ b/net/disk_cache/cache_util_posix.cc @@ -20,13 +20,17 @@ void DeleteCache(const FilePath& path, bool remove_folder) { /* recursive */ false, file_util::FileEnumerator::FILES); for (FilePath file = iter.Next(); !file.value().empty(); file = iter.Next()) { - if (!file_util::Delete(file, /* recursive */ false)) - NOTREACHED(); + if (!file_util::Delete(file, /* recursive */ false)) { + LOG(WARNING) << "Unable to delete cache."; + return; + } } if (remove_folder) { - if (!file_util::Delete(path, /* recursive */ false)) - NOTREACHED(); + if (!file_util::Delete(path, /* recursive */ false)) { + LOG(WARNING) << "Unable to delete cache folder."; + return; + } } } |