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

Unified Diff: components/sync/driver/data_type_controller.h

Issue 2641523004: [Sync] Make directory types registration explicit in ModelTypeRegistry (Closed)
Patch Set: 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/driver/data_type_controller.h
diff --git a/components/sync/driver/data_type_controller.h b/components/sync/driver/data_type_controller.h
index aef685cdbc2cb6afcf85026f484a8db39d22830a..840113211c64873aba7252a50dca6e8b2e192928 100644
--- a/components/sync/driver/data_type_controller.h
+++ b/components/sync/driver/data_type_controller.h
@@ -91,6 +91,12 @@ class DataTypeController : public base::SupportsWeakPtr<DataTypeController> {
// return false while USS datatypes should return true.
virtual bool ShouldLoadModelBeforeConfigure() const = 0;
+ // Called right before LoadModels. This method allows controller to register
+ // with sync engine. Directory datatypes download initial data in parallel
+ // with LoadModels and thus should be ready to receive updates with initial
+ // data before LoadModels finishes.
+ virtual void BeforeLoadModels(ModelTypeConfigurer* configurer) = 0;
+
// Begins asynchronous operation of loading the model to get it ready for
// model association. Once the models are loaded the callback will be invoked
// with the result. If the models are already loaded it is safe to call the

Powered by Google App Engine
This is Rietveld 408576698