Unlink corrupt SimpleCache index files immediately after load.
commita66d40a66368cccadb999120078a66c066f92a8d
authorgavinp@chromium.org <gavinp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 21 Jun 2013 14:40:38 +0000 (21 14:40 +0000)
committergavinp@chromium.org <gavinp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 21 Jun 2013 14:40:38 +0000 (21 14:40 +0000)
tree8ac32e90d6e4fd6f63e0e55d4e45d3b16e6480d4
parent26ac0cf5dc3eb77d4348d12357310cedb7b5b58a
Unlink corrupt SimpleCache index files immediately after load.

The crash on startup in the referenced bug is very bad in part because
the corrupt index which caused it is left on disk, so all startups
until user data is cleared will crash. For maximum safety, we should
unlink the index file ASAP after finding it is corrupt.

R=rdsmith@chromium.org
BUG=251465

Review URL: https://codereview.chromium.org/17265007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207813 0039d316-1c4b-4281-b951-d872f2087c98
net/disk_cache/simple/simple_index_file.cc
net/disk_cache/simple/simple_index_file.h
net/disk_cache/simple/simple_index_file_unittest.cc