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

Unified Diff: components/sync/core/shared_model_type_processor.h

Issue 2319973003: [USS] Implement SharedModelTypeProcessor::GetAllNodes for USS (Closed)
Patch Set: add comments Created 4 years, 3 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/core/shared_model_type_processor.h
diff --git a/components/sync/core/shared_model_type_processor.h b/components/sync/core/shared_model_type_processor.h
index 20b80a0c6fd42a95875bfff788663d757a3dcbbe..c392c726ccf91ab88eeaf0c09566a16375127f66 100644
--- a/components/sync/core/shared_model_type_processor.h
+++ b/components/sync/core/shared_model_type_processor.h
@@ -51,6 +51,11 @@ class SharedModelTypeProcessor : public ModelTypeProcessor,
// Returns true if the handshake with sync thread is complete.
bool IsConnected() const;
+ void GetAllNodes(
skym 2016/09/12 16:40:39 Comments
Gang Wu 2016/09/12 22:38:03 Done.
+ const scoped_refptr<base::TaskRunner>& task_runner,
+ const base::Callback<void(const syncer::ModelType,
+ std::unique_ptr<base::ListValue>)>& callback);
pavely 2016/09/12 20:43:04 Could you use DataTypeController::AllNodesCallback
Gang Wu 2016/09/12 22:38:03 I tried, but got circle dependence error during "g
+
// ModelTypeChangeProcessor implementation.
void Put(const std::string& storage_key,
std::unique_ptr<EntityData> entity_data,
@@ -143,6 +148,15 @@ class SharedModelTypeProcessor : public ModelTypeProcessor,
// Version of the above that generates a tag for |data|.
ProcessorEntityTracker* CreateEntity(const EntityData& data);
+ // This is callback function for ModelTypeService::GetAllData. This function
+ // will merge real data |batch| with metadata, then pass to |callback|.
+ void MergeDataWithMetadata(
+ const scoped_refptr<base::TaskRunner>& task_runner,
+ const base::Callback<void(const syncer::ModelType,
+ std::unique_ptr<base::ListValue>)>& callback,
+ syncer::SyncError error,
+ std::unique_ptr<DataBatch> batch);
+
const syncer::ModelType type_;
sync_pb::DataTypeState data_type_state_;

Powered by Google App Engine
This is Rietveld 408576698