| OLD | NEW |
| 1 // Copyright 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 COMPONENTS_SYNC_SESSIONS_MODEL_NEUTRAL_STATE_H_ | 5 #ifndef COMPONENTS_SYNC_SESSIONS_MODEL_NEUTRAL_STATE_H_ |
| 6 #define COMPONENTS_SYNC_SESSIONS_MODEL_NEUTRAL_STATE_H_ | 6 #define COMPONENTS_SYNC_SESSIONS_MODEL_NEUTRAL_STATE_H_ |
| 7 | 7 |
| 8 #include "components/sync/base/model_type.h" | 8 #include "components/sync/base/model_type.h" |
| 9 #include "components/sync/base/sync_export.h" | |
| 10 #include "components/sync/base/syncer_error.h" | 9 #include "components/sync/base/syncer_error.h" |
| 11 #include "components/sync/protocol/sync.pb.h" | 10 #include "components/sync/protocol/sync.pb.h" |
| 12 | 11 |
| 13 namespace syncer { | 12 namespace syncer { |
| 14 namespace sessions { | 13 namespace sessions { |
| 15 | 14 |
| 16 // Grouping of all state that applies to all model types. Note that some | 15 // Grouping of all state that applies to all model types. Note that some |
| 17 // components of the global grouping can internally implement finer grained | 16 // 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 | 17 // scope control, but the top level entity is still a singleton with respect to |
| 19 // model types. | 18 // model types. |
| 20 struct SYNC_EXPORT ModelNeutralState { | 19 struct ModelNeutralState { |
| 21 ModelNeutralState(); | 20 ModelNeutralState(); |
| 22 ModelNeutralState(const ModelNeutralState& other); | 21 ModelNeutralState(const ModelNeutralState& other); |
| 23 ~ModelNeutralState(); | 22 ~ModelNeutralState(); |
| 24 | 23 |
| 25 // The set of types for which updates were requested from the server. | 24 // The set of types for which updates were requested from the server. |
| 26 ModelTypeSet get_updates_request_types; | 25 ModelTypeSet get_updates_request_types; |
| 27 | 26 |
| 28 // The set of types for which commits were sent to the server. | 27 // The set of types for which commits were sent to the server. |
| 29 ModelTypeSet commit_request_types; | 28 ModelTypeSet commit_request_types; |
| 30 | 29 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 51 // Records the most recent results of GetKey, PostCommit and GetUpdates | 50 // Records the most recent results of GetKey, PostCommit and GetUpdates |
| 52 // commands. | 51 // commands. |
| 53 SyncerError last_get_key_result; | 52 SyncerError last_get_key_result; |
| 54 SyncerError last_download_updates_result; | 53 SyncerError last_download_updates_result; |
| 55 SyncerError commit_result; | 54 SyncerError commit_result; |
| 56 | 55 |
| 57 // Set to true by PostCommitMessageCommand if any commits were successful. | 56 // Set to true by PostCommitMessageCommand if any commits were successful. |
| 58 bool items_committed; | 57 bool items_committed; |
| 59 }; | 58 }; |
| 60 | 59 |
| 61 SYNC_EXPORT bool HasSyncerError(const ModelNeutralState& state); | 60 bool HasSyncerError(const ModelNeutralState& state); |
| 62 | 61 |
| 63 } // namespace sessions | 62 } // namespace sessions |
| 64 } // namespace syncer | 63 } // namespace syncer |
| 65 | 64 |
| 66 #endif // COMPONENTS_SYNC_SESSIONS_MODEL_NEUTRAL_STATE_H_ | 65 #endif // COMPONENTS_SYNC_SESSIONS_MODEL_NEUTRAL_STATE_H_ |
| OLD | NEW |