Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(567)

Side by Side Diff: sync/engine/syncer.h

Issue 11192071: sync: Merge apply updates and resolve conflicts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 13 matching lines...) Expand all
24 class MutableEntry; 24 class MutableEntry;
25 } // namespace syncable 25 } // namespace syncable
26 26
27 enum SyncerStep { 27 enum SyncerStep {
28 SYNCER_BEGIN, 28 SYNCER_BEGIN,
29 DOWNLOAD_UPDATES, 29 DOWNLOAD_UPDATES,
30 PROCESS_UPDATES, 30 PROCESS_UPDATES,
31 STORE_TIMESTAMPS, 31 STORE_TIMESTAMPS,
32 APPLY_UPDATES, 32 APPLY_UPDATES,
33 COMMIT, 33 COMMIT,
34 RESOLVE_CONFLICTS,
35 APPLY_UPDATES_TO_RESOLVE_CONFLICTS,
36 SYNCER_END 34 SYNCER_END
37 }; 35 };
38 36
39 // A Syncer provides a control interface for driving the individual steps 37 // A Syncer provides a control interface for driving the individual steps
40 // of the sync cycle. Each cycle (hopefully) moves the client into closer 38 // of the sync cycle. Each cycle (hopefully) moves the client into closer
41 // synchronization with the server. The individual steps are modeled 39 // synchronization with the server. The individual steps are modeled
42 // as SyncerCommands, and the ordering of the steps is expressed using 40 // as SyncerCommands, and the ordering of the steps is expressed using
43 // the SyncerStep enum. 41 // the SyncerStep enum.
44 // 42 //
45 // A Syncer instance expects to run on a dedicated thread. Calls 43 // A Syncer instance expects to run on a dedicated thread. Calls
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 }; 93 };
96 94
97 // Utility function declarations. 95 // Utility function declarations.
98 void CopyServerFields(syncable::Entry* src, syncable::MutableEntry* dest); 96 void CopyServerFields(syncable::Entry* src, syncable::MutableEntry* dest);
99 void ClearServerData(syncable::MutableEntry* entry); 97 void ClearServerData(syncable::MutableEntry* entry);
100 const char* SyncerStepToString(const SyncerStep); 98 const char* SyncerStepToString(const SyncerStep);
101 99
102 } // namespace syncer 100 } // namespace syncer
103 101
104 #endif // SYNC_ENGINE_SYNCER_H_ 102 #endif // SYNC_ENGINE_SYNCER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698