OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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_SESSIONS_MODEL_NEUTRAL_STATE_H | 5 #ifndef SYNC_SESSIONS_MODEL_NEUTRAL_STATE_H |
6 #define SYNC_SESSIONS_MODEL_NEUTRAL_STATE_H | 6 #define SYNC_SESSIONS_MODEL_NEUTRAL_STATE_H |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "sync/base/sync_export.h" |
9 #include "sync/internal_api/public/util/syncer_error.h" | 10 #include "sync/internal_api/public/util/syncer_error.h" |
10 #include "sync/protocol/sync.pb.h" | 11 #include "sync/protocol/sync.pb.h" |
11 #include "sync/protocol/sync_protocol_error.h" | 12 #include "sync/protocol/sync_protocol_error.h" |
12 | 13 |
13 namespace syncer { | 14 namespace syncer { |
14 namespace sessions { | 15 namespace sessions { |
15 | 16 |
16 // Grouping of all state that applies to all model types. Note that some | 17 // Grouping of all state that applies to all model types. Note that some |
17 // components of the global grouping can internally implement finer grained | 18 // components of the global grouping can internally implement finer grained |
18 // scope control, but the top level entity is still a singleton with respect to | 19 // scope control, but the top level entity is still a singleton with respect to |
19 // model types. | 20 // model types. |
20 struct ModelNeutralState { | 21 struct SYNC_EXPORT ModelNeutralState { |
21 ModelNeutralState(); | 22 ModelNeutralState(); |
22 ~ModelNeutralState(); | 23 ~ModelNeutralState(); |
23 | 24 |
24 // We GetUpdates for some combination of types at once. | 25 // We GetUpdates for some combination of types at once. |
25 // requested_update_types stores the set of types which were requested. | 26 // requested_update_types stores the set of types which were requested. |
26 ModelTypeSet updates_request_types; | 27 ModelTypeSet updates_request_types; |
27 | 28 |
28 sync_pb::ClientToServerResponse updates_response; | 29 sync_pb::ClientToServerResponse updates_response; |
29 | 30 |
30 int num_successful_commits; | 31 int num_successful_commits; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 // really is nothing more to download. | 72 // really is nothing more to download. |
72 int64 num_server_changes_remaining; | 73 int64 num_server_changes_remaining; |
73 }; | 74 }; |
74 | 75 |
75 bool HasSyncerError(const ModelNeutralState& state); | 76 bool HasSyncerError(const ModelNeutralState& state); |
76 | 77 |
77 } // namespace sessions | 78 } // namespace sessions |
78 } // namespace syncer | 79 } // namespace syncer |
79 | 80 |
80 #endif // SYNC_SESSIONS_MODEL_NEUTRAL_STATE_H_ | 81 #endif // SYNC_SESSIONS_MODEL_NEUTRAL_STATE_H_ |
OLD | NEW |