diff options
Diffstat (limited to 'net/disk_cache/backend_impl.cc')
-rw-r--r-- | net/disk_cache/backend_impl.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/disk_cache/backend_impl.cc b/net/disk_cache/backend_impl.cc index 7810a97..cf8237e 100644 --- a/net/disk_cache/backend_impl.cc +++ b/net/disk_cache/backend_impl.cc @@ -1040,7 +1040,9 @@ void BackendImpl::RestartCache() { // Don't call Init() if directed by the unit test: we are simulating a failure // trying to re-enable the cache. - if (!unit_test_ && Init()) + if (unit_test_) + init_ = true; // Let the destructor do proper cleanup. + else if (Init()) stats_.SetCounter(Stats::FATAL_ERROR, errors + 1); } |