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

Unified Diff: sync/api/model_type_change_processor.h

Issue 1763953002: [USS] Change the place where SharedModelTypeProcessor got created (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 4 years, 9 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
« no previous file with comments | « components/sync_driver/ui_model_type_controller_unittest.cc ('k') | sync/api/model_type_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/api/model_type_change_processor.h
diff --git a/sync/api/model_type_change_processor.h b/sync/api/model_type_change_processor.h
index 5578db7ea33268c6c19da3f25b73f59f0f8c75c2..91f7380aa547412a5dc0f287952aec2067355656 100644
--- a/sync/api/model_type_change_processor.h
+++ b/sync/api/model_type_change_processor.h
@@ -10,6 +10,7 @@
#include "base/memory/scoped_ptr.h"
#include "sync/api/entity_data.h"
#include "sync/base/sync_export.h"
+#include "sync/internal_api/public/activation_context.h"
namespace syncer {
class SyncError;
@@ -24,6 +25,9 @@ class MetadataChangeList;
// changes.
class SYNC_EXPORT ModelTypeChangeProcessor {
public:
+ typedef base::Callback<void(syncer::SyncError, scoped_ptr<ActivationContext>)>
+ StartCallback;
+
ModelTypeChangeProcessor();
virtual ~ModelTypeChangeProcessor();
@@ -42,6 +46,12 @@ class SYNC_EXPORT ModelTypeChangeProcessor {
// Accept the initial sync metadata loaded by the service. This should be
// called as soon as the metadata is available to the service.
virtual void OnMetadataLoaded(scoped_ptr<MetadataBatch> batch) = 0;
+
+ // Called by the DataTypeController to gather additional information needed
+ // before a CommitQueue object can be created for this model type. Once the
+ // metadata has been loaded, the info is collected and given to |callback|.
+ // Once called, this can only be called again if sync is disconnected.
+ virtual void OnSyncStarting(const StartCallback& callback) = 0;
};
} // namespace syncer_v2
« no previous file with comments | « components/sync_driver/ui_model_type_controller_unittest.cc ('k') | sync/api/model_type_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698