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 COMPONENTS_SYNC_ENGINE_IMPL_SYNC_CYCLE_EVENT_H_ | 5 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_SYNC_CYCLE_EVENT_H_ |
6 #define COMPONENTS_SYNC_ENGINE_IMPL_SYNC_CYCLE_EVENT_H_ | 6 #define COMPONENTS_SYNC_ENGINE_IMPL_SYNC_CYCLE_EVENT_H_ |
7 | 7 |
8 #include "components/sync/engine/cycle/sync_cycle_snapshot.h" | 8 #include "components/sync/engine/cycle/sync_cycle_snapshot.h" |
9 | 9 |
10 namespace syncer { | 10 namespace syncer { |
11 | 11 |
12 struct SyncProtocolError; | |
13 | |
14 struct SyncCycleEvent { | 12 struct SyncCycleEvent { |
15 enum EventCause { | 13 enum EventCause { |
16 //////////////////////////////////////////////////////////////// | 14 //////////////////////////////////////////////////////////////// |
17 // Sent on entry of Syncer state machine | 15 // Sent on entry of Syncer state machine |
18 SYNC_CYCLE_BEGIN, | 16 SYNC_CYCLE_BEGIN, |
19 | 17 |
20 // Sent any time progress is made during a sync cycle. | 18 // Sent any time progress is made during a sync cycle. |
21 STATUS_CHANGED, | 19 STATUS_CHANGED, |
22 | 20 |
23 // We have reached the SYNCER_END state in the main sync loop. | 21 // We have reached the SYNCER_END state in the main sync loop. |
24 SYNC_CYCLE_ENDED, | 22 SYNC_CYCLE_ENDED, |
25 }; | 23 }; |
26 | 24 |
27 explicit SyncCycleEvent(EventCause cause); | 25 explicit SyncCycleEvent(EventCause cause); |
28 ~SyncCycleEvent(); | 26 ~SyncCycleEvent(); |
29 | 27 |
30 EventCause what_happened; | 28 EventCause what_happened; |
31 | 29 |
32 // The last cycle used for syncing. | 30 // The last cycle used for syncing. |
33 SyncCycleSnapshot snapshot; | 31 SyncCycleSnapshot snapshot; |
34 }; | 32 }; |
35 | 33 |
36 } // namespace syncer | 34 } // namespace syncer |
37 | 35 |
38 #endif // COMPONENTS_SYNC_ENGINE_IMPL_SYNC_CYCLE_EVENT_H_ | 36 #endif // COMPONENTS_SYNC_ENGINE_IMPL_SYNC_CYCLE_EVENT_H_ |
OLD | NEW |