OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_SYNC_CORE_MODEL_TYPE_PROCESSOR_H_ | 5 #ifndef COMPONENTS_SYNC_CORE_MODEL_TYPE_PROCESSOR_H_ |
6 #define COMPONENTS_SYNC_CORE_MODEL_TYPE_PROCESSOR_H_ | 6 #define COMPONENTS_SYNC_CORE_MODEL_TYPE_PROCESSOR_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "components/sync/core/non_blocking_sync_common.h" | 10 #include "components/sync/core/non_blocking_sync_common.h" |
11 #include "components/sync/protocol/data_type_state.pb.h" | 11 #include "components/sync/protocol/data_type_state.pb.h" |
12 | 12 |
13 namespace syncer { | 13 namespace syncer_v2 { |
14 class CommitQueue; | 14 class CommitQueue; |
15 | 15 |
16 // Interface used by sync backend to issue requests to a synced data type. | 16 // Interface used by sync backend to issue requests to a synced data type. |
17 class ModelTypeProcessor { | 17 class ModelTypeProcessor { |
18 public: | 18 public: |
19 ModelTypeProcessor(); | 19 ModelTypeProcessor(); |
20 virtual ~ModelTypeProcessor(); | 20 virtual ~ModelTypeProcessor(); |
21 | 21 |
22 // Connect this processor to the sync engine via |commit_queue|. Once called, | 22 // Connect this processor to the sync engine via |commit_queue|. Once called, |
23 // the processor will send any pending and future commits via this channel. | 23 // the processor will send any pending and future commits via this channel. |
(...skipping 11 matching lines...) Expand all Loading... |
35 virtual void OnCommitCompleted( | 35 virtual void OnCommitCompleted( |
36 const sync_pb::DataTypeState& type_state, | 36 const sync_pb::DataTypeState& type_state, |
37 const CommitResponseDataList& response_list) = 0; | 37 const CommitResponseDataList& response_list) = 0; |
38 | 38 |
39 // Informs this object that there are some incoming updates is should | 39 // Informs this object that there are some incoming updates is should |
40 // handle. | 40 // handle. |
41 virtual void OnUpdateReceived(const sync_pb::DataTypeState& type_state, | 41 virtual void OnUpdateReceived(const sync_pb::DataTypeState& type_state, |
42 const UpdateResponseDataList& updates) = 0; | 42 const UpdateResponseDataList& updates) = 0; |
43 }; | 43 }; |
44 | 44 |
45 } // namespace syncer | 45 } // namespace syncer_v2 |
46 | 46 |
47 #endif // COMPONENTS_SYNC_CORE_MODEL_TYPE_PROCESSOR_H_ | 47 #endif // COMPONENTS_SYNC_CORE_MODEL_TYPE_PROCESSOR_H_ |
OLD | NEW |