Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2139)

Unified Diff: chrome/browser/extensions/api/storage/policy_value_store.cc

Issue 175853002: Revert of Add a Restore() method to ValueStore and make StorageAPI use it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/storage/policy_value_store.cc
diff --git a/chrome/browser/extensions/api/storage/policy_value_store.cc b/chrome/browser/extensions/api/storage/policy_value_store.cc
index 9691e2bf01c832a43b7e6db4d6c8710d2d7858f6..f5da68205785a23105b728cac0fa2feef3c39eba 100644
--- a/chrome/browser/extensions/api/storage/policy_value_store.cc
+++ b/chrome/browser/extensions/api/storage/policy_value_store.cc
@@ -57,17 +57,6 @@
// must be removed.
base::DictionaryValue previous_policy;
ValueStore::ReadResult read_result = delegate_->Get();
-
- // If the database is corrupted, try to restore it.
- // This may have the unfortunate side-effect of incorrectly informing the
- // extension of a "new" key, which isn't new and was corrupted. Unfortunately,
- // there's not always a way around this - if the database is corrupted, there
- // may be no way of telling which keys were previously present.
- if (read_result->IsCorrupted()) {
- if (delegate_->Restore())
- read_result = delegate_->Get();
- }
-
if (read_result->HasError()) {
LOG(WARNING) << "Failed to read managed settings for extension "
<< extension_id_ << ": " << read_result->error().message;
@@ -172,10 +161,4 @@
return MakeWriteResult(ReadOnlyError(util::NoKey()));
}
-bool PolicyValueStore::Restore() { return delegate_->Restore(); }
-
-bool PolicyValueStore::RestoreKey(const std::string& key) {
- return delegate_->RestoreKey(key);
-}
-
} // namespace extensions
« no previous file with comments | « chrome/browser/extensions/api/storage/policy_value_store.h ('k') | chrome/browser/extensions/api/storage/settings_backend.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698