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/sync_export.h" | |
11 #include "components/sync/base/syncer_error.h" | 10 #include "components/sync/base/syncer_error.h" |
12 | 11 |
13 namespace sync_pb { | 12 namespace sync_pb { |
14 class DataTypeContext; | 13 class DataTypeContext; |
15 class DataTypeProgressMarker; | 14 class DataTypeProgressMarker; |
16 class SyncEntity; | 15 class SyncEntity; |
17 } | 16 } |
18 | 17 |
19 typedef std::vector<const sync_pb::SyncEntity*> SyncEntityList; | 18 typedef std::vector<const sync_pb::SyncEntity*> SyncEntityList; |
20 | 19 |
21 namespace syncer { | 20 namespace syncer { |
22 | 21 |
23 namespace sessions { | 22 namespace sessions { |
24 class StatusController; | 23 class StatusController; |
25 } | 24 } |
26 | 25 |
27 class ModelSafeWorker; | 26 class ModelSafeWorker; |
28 | 27 |
29 // This class represents an entity that can request, receive, and apply updates | 28 // This class represents an entity that can request, receive, and apply updates |
30 // from the sync server. | 29 // from the sync server. |
31 class SYNC_EXPORT UpdateHandler { | 30 class UpdateHandler { |
32 public: | 31 public: |
33 UpdateHandler(); | 32 UpdateHandler(); |
34 virtual ~UpdateHandler() = 0; | 33 virtual ~UpdateHandler() = 0; |
35 | 34 |
36 // Returns true if initial sync was performed for this type. | 35 // Returns true if initial sync was performed for this type. |
37 virtual bool IsInitialSyncEnded() const = 0; | 36 virtual bool IsInitialSyncEnded() const = 0; |
38 | 37 |
39 // Fills the given parameter with the stored progress marker for this type. | 38 // Fills the given parameter with the stored progress marker for this type. |
40 virtual void GetDownloadProgress( | 39 virtual void GetDownloadProgress( |
41 sync_pb::DataTypeProgressMarker* progress_marker) const = 0; | 40 sync_pb::DataTypeProgressMarker* progress_marker) const = 0; |
(...skipping 25 matching lines...) Expand all Loading... |
67 virtual void ApplyUpdates(sessions::StatusController* status) = 0; | 66 virtual void ApplyUpdates(sessions::StatusController* status) = 0; |
68 | 67 |
69 // Called at the end of a configure GetUpdates loop to perform any required | 68 // Called at the end of a configure GetUpdates loop to perform any required |
70 // post-initial-download update application. | 69 // post-initial-download update application. |
71 virtual void PassiveApplyUpdates(sessions::StatusController* status) = 0; | 70 virtual void PassiveApplyUpdates(sessions::StatusController* status) = 0; |
72 }; | 71 }; |
73 | 72 |
74 } // namespace syncer | 73 } // namespace syncer |
75 | 74 |
76 #endif // COMPONENTS_SYNC_ENGINE_IMPL_UPDATE_HANDLER_H_ | 75 #endif // COMPONENTS_SYNC_ENGINE_IMPL_UPDATE_HANDLER_H_ |
OLD | NEW |