| Index: chrome/browser/safe_browsing/safe_browsing_store_file.cc
|
| diff --git a/chrome/browser/safe_browsing/safe_browsing_store_file.cc b/chrome/browser/safe_browsing/safe_browsing_store_file.cc
|
| index 2159fa1ecf61a4d95adaf8129a58a5413c361bff..76a8958aad0b1f793849df313d44052d18da3b8a 100644
|
| --- a/chrome/browser/safe_browsing/safe_browsing_store_file.cc
|
| +++ b/chrome/browser/safe_browsing/safe_browsing_store_file.cc
|
| @@ -244,12 +244,13 @@ bool SafeBrowsingStoreFile::Delete() {
|
| }
|
|
|
| bool SafeBrowsingStoreFile::CheckValidity() {
|
| - if (empty_)
|
| + // The file was either empty or never opened. The empty case is
|
| + // presumed not to be invalid. The never-opened case can happen if
|
| + // BeginUpdate() fails for any databases, and should already have
|
| + // caused the corruption callback to fire.
|
| + if (!file_.get())
|
| return true;
|
|
|
| - // If the file was not empty, it should be open.
|
| - DCHECK(file_.get());
|
| -
|
| if (!FileRewind(file_.get()))
|
| return OnCorruptDatabase();
|
|
|
|
|