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

Unified Diff: chrome/browser/extensions/settings/syncable_settings_storage.h

Issue 8539037: Extension Settings API: make it so that when changes received from Sync fail to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments, sync Created 9 years, 1 month 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/settings/syncable_settings_storage.h
diff --git a/chrome/browser/extensions/settings/syncable_settings_storage.h b/chrome/browser/extensions/settings/syncable_settings_storage.h
index 700fb98f2c3edeaf1b2eb2b26561c8f9b9a25633..56bb88a3f609dbd2e5c951b43d52a7881183fc38 100644
--- a/chrome/browser/extensions/settings/syncable_settings_storage.h
+++ b/chrome/browser/extensions/settings/syncable_settings_storage.h
@@ -41,16 +41,23 @@ class SyncableSettingsStorage : public SettingsStorage {
virtual WriteResult Clear() OVERRIDE;
// Sync-related methods, analogous to those on SyncableService (handled by
- // ExtensionSettings).
+ // ExtensionSettings), but with looser guarantees about when the methods
+ // can be called.
+
+ // Must only be called if sync isn't already active; not idempotent since
+ // behaviour would be undefined given differerent values of |sync_state|.
SyncError StartSyncing(
// Either SETTINGS or APP_SETTINGS.
syncable::ModelType type,
const DictionaryValue& sync_state,
// Must NOT be NULL. Ownership NOT taken.
SyncChangeProcessor* sync_processor);
+
+ // May be called at any time (idempotent).
void StopSyncing();
- std::vector<SyncError> ProcessSyncChanges(
- const SettingSyncDataList& sync_changes);
+
+ // May be called at any time; changes will be ignored if sync isn't active.
+ SyncError ProcessSyncChanges(const SettingSyncDataList& sync_changes);
private:
// Propagates some changes to sync by sending an ADD/UPDATE/DELETE depending

Powered by Google App Engine
This is Rietveld 408576698