OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 // The sync process consists of a sequence of sync cycles, each of which | 5 // The sync process consists of a sequence of sync cycles, each of which |
6 // (hopefully) moves the client into closer synchronization with the server. | 6 // (hopefully) moves the client into closer synchronization with the server. |
7 // This class holds state that is pertinent to a single sync cycle. | 7 // This class holds state that is pertinent to a single sync cycle. |
8 // | 8 // |
9 // THIS CLASS PROVIDES NO SYNCHRONIZATION GUARANTEES. | 9 // THIS CLASS PROVIDES NO SYNCHRONIZATION GUARANTEES. |
10 | 10 |
(...skipping 28 matching lines...) Loading... |
39 // State may contain items that were unable to be processed because of | 39 // State may contain items that were unable to be processed because of |
40 // errors. | 40 // errors. |
41 class SyncCycleState { | 41 class SyncCycleState { |
42 public: | 42 public: |
43 SyncCycleState() | 43 SyncCycleState() |
44 : write_transaction_(NULL), | 44 : write_transaction_(NULL), |
45 conflict_sets_built_(false), | 45 conflict_sets_built_(false), |
46 conflicts_resolved_(false), | 46 conflicts_resolved_(false), |
47 items_committed_(false), | 47 items_committed_(false), |
48 over_quota_(false), | 48 over_quota_(false), |
49 dirty_(true), | 49 timestamp_dirty_(false), |
50 timestamp_dirty_(false) {} | 50 dirty_(true) {} |
51 | 51 |
52 void set_update_response(const ClientToServerResponse& update_response) { | 52 void set_update_response(const ClientToServerResponse& update_response) { |
53 update_response_.CopyFrom(update_response); | 53 update_response_.CopyFrom(update_response); |
54 } | 54 } |
55 | 55 |
56 const ClientToServerResponse& update_response() const { | 56 const ClientToServerResponse& update_response() const { |
57 return update_response_; | 57 return update_response_; |
58 } | 58 } |
59 | 59 |
60 void set_commit_response(const ClientToServerResponse& commit_response) { | 60 void set_commit_response(const ClientToServerResponse& commit_response) { |
(...skipping 180 matching lines...) Loading... |
241 // Stores the result of the various ApplyUpdate attempts we've made. | 241 // Stores the result of the various ApplyUpdate attempts we've made. |
242 // May contain duplicate entries. | 242 // May contain duplicate entries. |
243 std::vector<AppliedUpdate> applied_updates_; | 243 std::vector<AppliedUpdate> applied_updates_; |
244 | 244 |
245 DISALLOW_COPY_AND_ASSIGN(SyncCycleState); | 245 DISALLOW_COPY_AND_ASSIGN(SyncCycleState); |
246 }; | 246 }; |
247 | 247 |
248 } // namespace browser_sync | 248 } // namespace browser_sync |
249 | 249 |
250 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNC_CYCLE_STATE_H_ | 250 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNC_CYCLE_STATE_H_ |
OLD | NEW |