Index: sync/api/model_type_service.h |
diff --git a/sync/api/model_type_service.h b/sync/api/model_type_service.h |
index 950060ee28b7590e41eddee84ba05b892d8e07af..fe8f2ad75af6197ffd9505c5eefd73f3cedf56c0 100644 |
--- a/sync/api/model_type_service.h |
+++ b/sync/api/model_type_service.h |
@@ -20,6 +20,7 @@ namespace syncer_v2 { |
class DataBatch; |
class MetadataChangeList; |
+class SharedModelTypeProcessor; |
// Interface implemented by model types to receive updates from sync via the |
// SharedModelTypeProcessor. Provides a way for sync to update the data and |
@@ -70,11 +71,17 @@ class SYNC_EXPORT ModelTypeService { |
// TODO(skym): See crbug/547087, do we need all these accessors? |
ModelTypeChangeProcessor* change_processor() const; |
- void set_change_processor( |
- scoped_ptr<ModelTypeChangeProcessor> change_processor); |
+ // The function will create SharedModelTypeProcessor and send |
+ // notification(OnChangeProcessorSet). |
+ void InitializeProcessor(syncer::ModelType type); |
void clear_change_processor(); |
+ protected: |
+ // The function will create SharedModelTypeProcessor. |
+ virtual scoped_ptr<SharedModelTypeProcessor> CreateSharedModelTypeProcessor( |
skym
2016/03/04 22:12:28
Overriding virtual methods for so tests can inject
Gang Wu
2016/03/08 20:35:25
Done.
|
+ syncer::ModelType type); |
+ |
private: |
// Recieves ownership in set_change_processor(...). |
scoped_ptr<ModelTypeChangeProcessor> change_processor_; |