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 // The 'sessions' namespace comprises all the pieces of state that are | 5 // The 'sessions' namespace comprises all the pieces of state that are |
6 // combined to form a SyncSession instance. In that way, it can be thought of | 6 // combined to form a SyncSession instance. In that way, it can be thought of |
7 // as an extension of the SyncSession type itself. Session scoping gives | 7 // as an extension of the SyncSession type itself. Session scoping gives |
8 // context to things like "conflict progress", "update progress", etc, and the | 8 // context to things like "conflict progress", "update progress", etc, and the |
9 // separation this file provides allows clients to only include the parts they | 9 // separation this file provides allows clients to only include the parts they |
10 // need rather than the entire session stack. | 10 // need rather than the entire session stack. |
11 | 11 |
12 #ifndef SYNC_SESSIONS_SESSION_STATE_H_ | 12 #ifndef SYNC_SESSIONS_SESSION_STATE_H_ |
13 #define SYNC_SESSIONS_SESSION_STATE_H_ | 13 #define SYNC_SESSIONS_SESSION_STATE_H_ |
14 #pragma once | 14 #pragma once |
15 | 15 |
16 #include <set> | 16 #include <set> |
17 #include <vector> | 17 #include <vector> |
18 | 18 |
19 #include "sync/engine/syncer_types.h" | 19 #include "sync/engine/syncer_types.h" |
20 #include "sync/engine/syncproto.h" | 20 #include "sync/protocol/sync.pb.h" |
21 #include "sync/syncable/syncable_id.h" | 21 #include "sync/syncable/syncable_id.h" |
22 | 22 |
23 namespace syncer { | 23 namespace syncer { |
24 namespace sessions { | 24 namespace sessions { |
25 | 25 |
26 // Tracks progress of conflicts and their resolutions. | 26 // Tracks progress of conflicts and their resolutions. |
27 class ConflictProgress { | 27 class ConflictProgress { |
28 public: | 28 public: |
29 explicit ConflictProgress(); | 29 explicit ConflictProgress(); |
30 ~ConflictProgress(); | 30 ~ConflictProgress(); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 ~PerModelSafeGroupState(); | 125 ~PerModelSafeGroupState(); |
126 | 126 |
127 UpdateProgress update_progress; | 127 UpdateProgress update_progress; |
128 ConflictProgress conflict_progress; | 128 ConflictProgress conflict_progress; |
129 }; | 129 }; |
130 | 130 |
131 } // namespace sessions | 131 } // namespace sessions |
132 } // namespace syncer | 132 } // namespace syncer |
133 | 133 |
134 #endif // SYNC_SESSIONS_SESSION_STATE_H_ | 134 #endif // SYNC_SESSIONS_SESSION_STATE_H_ |
OLD | NEW |