Index: sync/api/sync_change_processor.h |
diff --git a/sync/api/sync_change_processor.h b/sync/api/sync_change_processor.h |
index 69494f0849ca42f6b8e9dd9760aa39073de06594..3cdf6a8c2b701e45aac2ea7cb674c963a54cfd00 100644 |
--- a/sync/api/sync_change_processor.h |
+++ b/sync/api/sync_change_processor.h |
@@ -25,6 +25,8 @@ typedef std::vector<SyncChange> SyncChangeList; |
// An interface for services that handle receiving SyncChanges. |
class SYNC_EXPORT SyncChangeProcessor { |
public: |
+ typedef base::Callback<void(const SyncData&)> GetSyncDataCallback; |
+ |
SyncChangeProcessor(); |
virtual ~SyncChangeProcessor(); |
@@ -46,6 +48,21 @@ class SYNC_EXPORT SyncChangeProcessor { |
// WARNING: This can be a potentially slow & memory intensive operation and |
// should only be used when absolutely necessary / sparingly. |
virtual SyncDataList GetAllSyncData(ModelType type) const = 0; |
+ |
+ // Retrieves the SyncData identified by |type| and |sync_tag| and invokes |
+ // |callback| asynchronously. If no such SyncData exists locally, IsValid on |
+ // the SyncData passed to |callback| will return false. |
+ // |
+ // This is an asynchronous local operation that may result in disk IO. |
+ // |
+ // Refer to sync_data.h for a description of |sync_tag|. |
+ // |
+ // TODO:(maniscalco): N.B. this method should really be pure virtual. An |
+ // implentation is provided here just to verify that everything compiles. |
+ // Update this method to be pure virtual (bug 353300). |
+ virtual void GetSyncData(const ModelType& type, |
+ const std::string& sync_tag, |
+ const GetSyncDataCallback& callback) const {} |
}; |
} // namespace syncer |