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_ENGINE_IMPL_UPDATE_HANDLER_H_ | 5 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_UPDATE_HANDLER_H_ |
6 #define COMPONENTS_SYNC_ENGINE_IMPL_UPDATE_HANDLER_H_ | 6 #define COMPONENTS_SYNC_ENGINE_IMPL_UPDATE_HANDLER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "components/sync/base/syncer_error.h" | 10 #include "components/sync/base/syncer_error.h" |
11 | 11 |
12 namespace sync_pb { | 12 namespace sync_pb { |
13 class DataTypeContext; | 13 class DataTypeContext; |
14 class DataTypeProgressMarker; | 14 class DataTypeProgressMarker; |
15 class SyncEntity; | 15 class SyncEntity; |
16 } | 16 } |
17 | 17 |
18 typedef std::vector<const sync_pb::SyncEntity*> SyncEntityList; | 18 typedef std::vector<const sync_pb::SyncEntity*> SyncEntityList; |
19 | 19 |
20 namespace syncer { | 20 namespace syncer { |
21 | 21 |
22 class ModelSafeWorker; | |
23 class StatusController; | 22 class StatusController; |
24 | 23 |
25 // This class represents an entity that can request, receive, and apply updates | 24 // This class represents an entity that can request, receive, and apply updates |
26 // from the sync server. | 25 // from the sync server. |
27 class UpdateHandler { | 26 class UpdateHandler { |
28 public: | 27 public: |
29 UpdateHandler(); | 28 UpdateHandler(); |
30 virtual ~UpdateHandler() = 0; | 29 virtual ~UpdateHandler() = 0; |
31 | 30 |
32 // Returns true if initial sync was performed for this type. | 31 // Returns true if initial sync was performed for this type. |
(...skipping 30 matching lines...) Expand all Loading... |
63 virtual void ApplyUpdates(StatusController* status) = 0; | 62 virtual void ApplyUpdates(StatusController* status) = 0; |
64 | 63 |
65 // Called at the end of a configure GetUpdates loop to perform any required | 64 // Called at the end of a configure GetUpdates loop to perform any required |
66 // post-initial-download update application. | 65 // post-initial-download update application. |
67 virtual void PassiveApplyUpdates(StatusController* status) = 0; | 66 virtual void PassiveApplyUpdates(StatusController* status) = 0; |
68 }; | 67 }; |
69 | 68 |
70 } // namespace syncer | 69 } // namespace syncer |
71 | 70 |
72 #endif // COMPONENTS_SYNC_ENGINE_IMPL_UPDATE_HANDLER_H_ | 71 #endif // COMPONENTS_SYNC_ENGINE_IMPL_UPDATE_HANDLER_H_ |
OLD | NEW |