| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 enum SyncerStep { | 29 enum SyncerStep { |
| 30 SYNCER_BEGIN, | 30 SYNCER_BEGIN, |
| 31 CLEANUP_DISABLED_TYPES, | 31 CLEANUP_DISABLED_TYPES, |
| 32 DOWNLOAD_UPDATES, | 32 DOWNLOAD_UPDATES, |
| 33 PROCESS_CLIENT_COMMAND, | 33 PROCESS_CLIENT_COMMAND, |
| 34 VERIFY_UPDATES, | 34 VERIFY_UPDATES, |
| 35 PROCESS_UPDATES, | 35 PROCESS_UPDATES, |
| 36 STORE_TIMESTAMPS, | 36 STORE_TIMESTAMPS, |
| 37 APPLY_UPDATES, | 37 APPLY_UPDATES, |
| 38 BUILD_COMMIT_REQUEST, | 38 COMMIT, |
| 39 POST_COMMIT_MESSAGE, | |
| 40 PROCESS_COMMIT_RESPONSE, | |
| 41 RESOLVE_CONFLICTS, | 39 RESOLVE_CONFLICTS, |
| 42 APPLY_UPDATES_TO_RESOLVE_CONFLICTS, | 40 APPLY_UPDATES_TO_RESOLVE_CONFLICTS, |
| 43 CLEAR_PRIVATE_DATA, // TODO(tim): Rename 'private' to 'user'. | 41 CLEAR_PRIVATE_DATA, // TODO(tim): Rename 'private' to 'user'. |
| 44 SYNCER_END | 42 SYNCER_END |
| 45 }; | 43 }; |
| 46 | 44 |
| 47 // A Syncer provides a control interface for driving the individual steps | 45 // A Syncer provides a control interface for driving the individual steps |
| 48 // of the sync cycle. Each cycle (hopefully) moves the client into closer | 46 // of the sync cycle. Each cycle (hopefully) moves the client into closer |
| 49 // synchronization with the server. The individual steps are modeled | 47 // synchronization with the server. The individual steps are modeled |
| 50 // as SyncerCommands, and the ordering of the steps is expressed using | 48 // as SyncerCommands, and the ordering of the steps is expressed using |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 }; | 104 }; |
| 107 | 105 |
| 108 // Utility function declarations. | 106 // Utility function declarations. |
| 109 void CopyServerFields(syncable::Entry* src, syncable::MutableEntry* dest); | 107 void CopyServerFields(syncable::Entry* src, syncable::MutableEntry* dest); |
| 110 void ClearServerData(syncable::MutableEntry* entry); | 108 void ClearServerData(syncable::MutableEntry* entry); |
| 111 const char* SyncerStepToString(const SyncerStep); | 109 const char* SyncerStepToString(const SyncerStep); |
| 112 | 110 |
| 113 } // namespace browser_sync | 111 } // namespace browser_sync |
| 114 | 112 |
| 115 #endif // SYNC_ENGINE_SYNCER_H_ | 113 #endif // SYNC_ENGINE_SYNCER_H_ |
| OLD | NEW |