diff options
author | cmumford <cmumford@chromium.org> | 2015-11-16 10:20:43 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-16 18:21:45 +0000 |
commit | 47081c8eda313d8dabadadcfd09a4196802862a3 (patch) | |
tree | 9118d83b966455eb5b7c0373925d2fad2c6d9133 /extensions/browser/value_store | |
parent | c3dcc79c556f87330d18703b538962c0d4c0a7e4 (diff) | |
download | chromium_src-47081c8eda313d8dabadadcfd09a4196802862a3.zip chromium_src-47081c8eda313d8dabadadcfd09a4196802862a3.tar.gz chromium_src-47081c8eda313d8dabadadcfd09a4196802862a3.tar.bz2 |
Extensions: Checking for failure when reading settings from db.
Previously SettingsStorageQuotaEnforcer::CalculateUsage() made one
attempt to restore the db, but assumed that a second call to Get()
would always return a valid settings dictionary.
BUG=554657
Review URL: https://codereview.chromium.org/1434133002
Cr-Commit-Position: refs/heads/master@{#359866}
Diffstat (limited to 'extensions/browser/value_store')
-rw-r--r-- | extensions/browser/value_store/leveldb_value_store.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/extensions/browser/value_store/leveldb_value_store.cc b/extensions/browser/value_store/leveldb_value_store.cc index 4b38b7e..3bdbeef 100644 --- a/extensions/browser/value_store/leveldb_value_store.cc +++ b/extensions/browser/value_store/leveldb_value_store.cc @@ -305,6 +305,7 @@ bool LeveldbValueStore::Restore() { leveldb::Options options; options.create_if_missing = true; + options.paranoid_checks = true; // Repair can drop an unbounded number of leveldb tables (key/value sets) leveldb::Status status = leveldb::RepairDB(db_path_.AsUTF8Unsafe(), options); |