| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SYNCER_H_ | 5 #ifndef SYNC_ENGINE_SYNCER_H_ |
| 6 #define SYNC_ENGINE_SYNCER_H_ | 6 #define SYNC_ENGINE_SYNCER_H_ |
| 7 | 7 |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 enum SyncerStep { | 27 enum SyncerStep { |
| 28 SYNCER_BEGIN, | 28 SYNCER_BEGIN, |
| 29 DOWNLOAD_UPDATES, | 29 DOWNLOAD_UPDATES, |
| 30 PROCESS_CLIENT_COMMAND, | 30 PROCESS_CLIENT_COMMAND, |
| 31 VERIFY_UPDATES, | 31 VERIFY_UPDATES, |
| 32 PROCESS_UPDATES, | 32 PROCESS_UPDATES, |
| 33 STORE_TIMESTAMPS, | 33 STORE_TIMESTAMPS, |
| 34 APPLY_UPDATES, | 34 APPLY_UPDATES, |
| 35 COMMIT, | 35 COMMIT, |
| 36 RESOLVE_CONFLICTS, | |
| 37 APPLY_UPDATES_TO_RESOLVE_CONFLICTS, | |
| 38 SYNCER_END | 36 SYNCER_END |
| 39 }; | 37 }; |
| 40 | 38 |
| 41 // A Syncer provides a control interface for driving the individual steps | 39 // A Syncer provides a control interface for driving the individual steps |
| 42 // of the sync cycle. Each cycle (hopefully) moves the client into closer | 40 // of the sync cycle. Each cycle (hopefully) moves the client into closer |
| 43 // synchronization with the server. The individual steps are modeled | 41 // synchronization with the server. The individual steps are modeled |
| 44 // as SyncerCommands, and the ordering of the steps is expressed using | 42 // as SyncerCommands, and the ordering of the steps is expressed using |
| 45 // the SyncerStep enum. | 43 // the SyncerStep enum. |
| 46 // | 44 // |
| 47 // A Syncer instance expects to run on a dedicated thread. Calls | 45 // A Syncer instance expects to run on a dedicated thread. Calls |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 }; | 98 }; |
| 101 | 99 |
| 102 // Utility function declarations. | 100 // Utility function declarations. |
| 103 void CopyServerFields(syncable::Entry* src, syncable::MutableEntry* dest); | 101 void CopyServerFields(syncable::Entry* src, syncable::MutableEntry* dest); |
| 104 void ClearServerData(syncable::MutableEntry* entry); | 102 void ClearServerData(syncable::MutableEntry* entry); |
| 105 const char* SyncerStepToString(const SyncerStep); | 103 const char* SyncerStepToString(const SyncerStep); |
| 106 | 104 |
| 107 } // namespace syncer | 105 } // namespace syncer |
| 108 | 106 |
| 109 #endif // SYNC_ENGINE_SYNCER_H_ | 107 #endif // SYNC_ENGINE_SYNCER_H_ |
| OLD | NEW |