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 SYNC_ENGINE_UPDATE_HANDLER_H_ | 5 #ifndef SYNC_ENGINE_UPDATE_HANDLER_H_ |
6 #define SYNC_ENGINE_UPDATE_HANDLER_H_ | 6 #define SYNC_ENGINE_UPDATE_HANDLER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "sync/base/sync_export.h" | 10 #include "sync/base/sync_export.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 // Processes the contents of a GetUpdates response message. | 43 // Processes the contents of a GetUpdates response message. |
44 // | 44 // |
45 // Should be invoked with the progress marker and set of SyncEntities from a | 45 // Should be invoked with the progress marker and set of SyncEntities from a |
46 // single GetUpdates response message. The progress marker's type must match | 46 // single GetUpdates response message. The progress marker's type must match |
47 // this update handler's type, and the set of SyncEntities must include all | 47 // this update handler's type, and the set of SyncEntities must include all |
48 // entities of this type found in the response message. | 48 // entities of this type found in the response message. |
49 // | 49 // |
50 // In this context, "applicable_updates" means the set of updates belonging to | 50 // In this context, "applicable_updates" means the set of updates belonging to |
51 // this type. | 51 // this type. |
52 virtual void ProcessGetUpdatesResponse( | 52 // |
| 53 // Returns true if the response was successfully handled, false if an error |
| 54 // occurred and the GetUpdates should be retried. |
| 55 virtual bool ProcessGetUpdatesResponse( |
53 const sync_pb::DataTypeProgressMarker& progress_marker, | 56 const sync_pb::DataTypeProgressMarker& progress_marker, |
54 const sync_pb::DataTypeContext& mutated_context, | 57 const sync_pb::DataTypeContext& mutated_context, |
55 const SyncEntityList& applicable_updates, | 58 const SyncEntityList& applicable_updates, |
56 sessions::StatusController* status) = 0; | 59 sessions::StatusController* status) = 0; |
57 | 60 |
58 // Called at the end of a non-configure GetUpdates loop to apply any unapplied | 61 // Called at the end of a non-configure GetUpdates loop to apply any unapplied |
59 // updates. | 62 // updates. |
60 virtual void ApplyUpdates(sessions::StatusController* status) = 0; | 63 virtual void ApplyUpdates(sessions::StatusController* status) = 0; |
61 | 64 |
62 // Called at the end of a configure GetUpdates loop to perform any required | 65 // Called at the end of a configure GetUpdates loop to perform any required |
63 // post-initial-download update application. | 66 // post-initial-download update application. |
64 virtual void PassiveApplyUpdates(sessions::StatusController* status) = 0; | 67 virtual void PassiveApplyUpdates(sessions::StatusController* status) = 0; |
65 }; | 68 }; |
66 | 69 |
67 } // namespace syncer | 70 } // namespace syncer |
68 | 71 |
69 #endif // SYNC_ENGINE_UPDATE_HANDLER_H_ | 72 #endif // SYNC_ENGINE_UPDATE_HANDLER_H_ |
OLD | NEW |