Skip to content

Commit

Permalink
Change NOTREACHED for a LOG(WARNING) when we can't delete
Browse files Browse the repository at this point in the history
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
  • Loading branch information
nsylvain@chromium.org committed Apr 2, 2010
1 parent d465a65 commit 56e1e0f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions net/disk_cache/cache_util_posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}

Expand Down

0 comments on commit 56e1e0f

Please sign in to comment.