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

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

Issue 165223003: 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/syncable_settings_storage.cc
diff --git a/chrome/browser/extensions/api/storage/syncable_settings_storage.cc b/chrome/browser/extensions/api/storage/syncable_settings_storage.cc
index db877c6882bad8e34362faf01c7b9974e48fd2cc..2366d60f33e611accc575e5703bd2daa4a9f7ca1 100644
--- a/chrome/browser/extensions/api/storage/syncable_settings_storage.cc
+++ b/chrome/browser/extensions/api/storage/syncable_settings_storage.cc
@@ -122,6 +122,18 @@ ValueStore::WriteResult SyncableSettingsStorage::Clear() {
return result.Pass();
}
+bool SyncableSettingsStorage::Restore() {
+ // If we're syncing, stop - we don't want to push the deletion of any data.
+ StopSyncing();
not at google - send to devlin 2014/02/14 19:35:56 For this method and below: I would have thought t
Devlin 2014/02/18 23:55:22 Right now, my understanding of what will happen is
not at google - send to devlin 2014/02/19 21:25:29 Cool. This is basically the same discussion we had
Devlin 2014/02/19 23:12:28 Already done on patch set 2.
+ return delegate_->Restore();
+}
+
+bool SyncableSettingsStorage::RestoreKey(const std::string& key) {
+ // If we're syncing, stop - we don't want to push the deletion of any data.
+ StopSyncing();
+ return delegate_->RestoreKey(key);
+}
+
void SyncableSettingsStorage::SyncResultIfEnabled(
const ValueStore::WriteResult& result) {
if (result->changes().empty())

Powered by Google App Engine
This is Rietveld 408576698