Index: storage/browser/quota/quota_database.cc |
diff --git a/storage/browser/quota/quota_database.cc b/storage/browser/quota/quota_database.cc |
index 85e0000645c35c8d3dac722c82d997a69ebcb6c2..b2626c52b6901137994539573aa5e6bb88028915 100644 |
--- a/storage/browser/quota/quota_database.cc |
+++ b/storage/browser/quota/quota_database.cc |
@@ -459,11 +459,16 @@ bool QuotaDatabase::LazyOpen(bool create_if_needed) { |
} |
if (!opened || !EnsureDatabaseVersion()) { |
- LOG(ERROR) << "Failed to open the quota database."; |
- is_disabled_ = true; |
- db_.reset(); |
- meta_table_.reset(); |
- return false; |
+ LOG(ERROR) << "Could not open the quota database: " |
+ << "probably database is currupted. " |
+ << "Trying to reset..."; |
+ if (!ResetSchema()) { |
+ LOG(ERROR) << "Failed to reset the quota database."; |
+ is_disabled_ = true; |
+ db_.reset(); |
+ meta_table_.reset(); |
+ return false; |
+ } |
} |
// Start a long-running transaction. |