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

Unified Diff: sync/api/model_type_service.h

Issue 1763953002: [USS] Change the place where SharedModelTypeProcessor got created (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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: 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_;

Powered by Google App Engine
This is Rietveld 408576698