Index: sync/api/model_type_service.h |
diff --git a/sync/api/model_type_service.h b/sync/api/model_type_service.h |
index bba4211ffe47af84dfff1f733272dad5d594dcca..683a62e920348a1fb721874c6698842d71b5aa7f 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 |
@@ -29,6 +30,9 @@ class SYNC_EXPORT ModelTypeService { |
typedef base::Callback<void(syncer::SyncError, scoped_ptr<DataBatch>)> |
DataCallback; |
typedef std::vector<std::string> ClientTagList; |
+ typedef base::Callback<scoped_ptr<ModelTypeChangeProcessor>( |
+ ModelTypeService* service)> |
+ SharedProcessorFactory; |
ModelTypeService(); |
@@ -81,13 +85,14 @@ 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). |
+ ModelTypeChangeProcessor* InitializeProcessor( |
maxbogue
2016/03/15 17:37:33
The service might need to create the processor bef
|
+ const SharedProcessorFactory& shared_processor_factory); |
void clear_change_processor(); |
private: |
- // Recieves ownership in set_change_processor(...). |
scoped_ptr<ModelTypeChangeProcessor> change_processor_; |
}; |