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..ff2b5f79300eabe637e8942628551a22c0723083 100644 |
--- a/chrome/browser/extensions/api/storage/syncable_settings_storage.cc |
+++ b/chrome/browser/extensions/api/storage/syncable_settings_storage.cc |
@@ -122,6 +122,26 @@ 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. |
+ // At next startup, when we start up the sync service, we'll get back any |
+ // data which was stored intact on Sync. |
+ // TODO (rdevlin.cronin): Investigate if there's a way we can trigger |
+ // MergeDataAndStartSyncing() to immediately get back any data we can. |
not at google - send to devlin
2014/02/19 21:25:29
(and it would be very nice to continue to sync as
Devlin
2014/02/19 23:12:28
Comment updated.
|
+ StopSyncing(); |
+ 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. |
+ // At next startup, when we start up the sync service, we'll get back any |
+ // data which was stored intact on Sync. |
+ // TODO (rdevlin.cronin): Investigate if there's a way we can trigger |
+ // MergeDataAndStartSyncing() to immediately get back any data we can. |
+ StopSyncing(); |
+ return delegate_->RestoreKey(key); |
+} |
+ |
void SyncableSettingsStorage::SyncResultIfEnabled( |
const ValueStore::WriteResult& result) { |
if (result->changes().empty()) |