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

Unified Diff: components/sync/model/model_type_sync_bridge.h

Issue 2621373004: [Sync] Renamed OnMetadataLoaded to ModelReadyToSync. (Closed)
Patch Set: Rebase. Created 3 years, 11 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: components/sync/model/model_type_sync_bridge.h
diff --git a/components/sync/model/model_type_sync_bridge.h b/components/sync/model/model_type_sync_bridge.h
index 74e7df45cda788681eaf2acfd4f6e1338929740b..6dde843b8ef774698faf2b4a87a3a4d97b69f8cb 100644
--- a/components/sync/model/model_type_sync_bridge.h
+++ b/components/sync/model/model_type_sync_bridge.h
@@ -28,10 +28,10 @@ class MetadataChangeList;
// ModelTypeChangeProcessor. Provides a way for sync to update the data and
// metadata for entities, as well as the model type state. Sync bridge
// implementations must provide their change_processor() with metadata through
-// OnMetadataLoaded() as soon as possible. Once this is called, sync will
+// ModelReadyToSync() as soon as possible. Once this is called, sync will
// immediately begin locally tracking changes and can start syncing with the
// server soon afterward. If an error occurs during startup, the processor's
-// ReportError() method should be called instead of OnMetadataLoaded().
+// ReportError() method should be called instead of ModelReadyToSync().
class ModelTypeSyncBridge : public base::SupportsWeakPtr<ModelTypeSyncBridge> {
public:
typedef base::Callback<void(std::unique_ptr<DataBatch>)> DataCallback;
@@ -121,6 +121,9 @@ class ModelTypeSyncBridge : public base::SupportsWeakPtr<ModelTypeSyncBridge> {
// metadata, and then destroys the change processor.
virtual void DisableSync();
+ // Needs to be informed about any model change occurring via Delete() and
+ // Put(). The changing metadata should be stored to persistent storage before
+ // or atomically with the model changes.
ModelTypeChangeProcessor* change_processor() const;
private:
« no previous file with comments | « components/sync/model/model_type_change_processor.h ('k') | components/sync/model/model_type_sync_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698