| 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 #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/internal_api/public/util/syncer_error.h" | 9 #include "sync/internal_api/public/util/syncer_error.h" |
| 10 #include "sync/protocol/sync.pb.h" | 10 #include "sync/protocol/sync.pb.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 53 |
| 54 // Any protocol errors that we received during this sync session. | 54 // Any protocol errors that we received during this sync session. |
| 55 SyncProtocolError sync_protocol_error; | 55 SyncProtocolError sync_protocol_error; |
| 56 | 56 |
| 57 // Records the most recent results of GetKey, PostCommit and GetUpdates | 57 // Records the most recent results of GetKey, PostCommit and GetUpdates |
| 58 // commands. | 58 // commands. |
| 59 SyncerError last_get_key_result; | 59 SyncerError last_get_key_result; |
| 60 SyncerError last_download_updates_result; | 60 SyncerError last_download_updates_result; |
| 61 SyncerError commit_result; | 61 SyncerError commit_result; |
| 62 | 62 |
| 63 // Set to true by ResolveConflictsCommand if any forward progress was made. | |
| 64 bool conflicts_resolved; | |
| 65 | |
| 66 // Set to true by PostCommitMessageCommand if any commits were successful. | 63 // Set to true by PostCommitMessageCommand if any commits were successful. |
| 67 bool items_committed; | 64 bool items_committed; |
| 68 | 65 |
| 69 // True indicates debug info has been sent once this session. | 66 // True indicates debug info has been sent once this session. |
| 70 bool debug_info_sent; | 67 bool debug_info_sent; |
| 71 | 68 |
| 72 // Number of changes remaining, according to the server. | 69 // Number of changes remaining, according to the server. |
| 73 // Take it as an estimate unless it's value is zero, in which case there | 70 // Take it as an estimate unless it's value is zero, in which case there |
| 74 // really is nothing more to download. | 71 // really is nothing more to download. |
| 75 int64 num_server_changes_remaining; | 72 int64 num_server_changes_remaining; |
| 76 }; | 73 }; |
| 77 | 74 |
| 78 bool HasSyncerError(const ModelNeutralState& state); | 75 bool HasSyncerError(const ModelNeutralState& state); |
| 79 | 76 |
| 80 } // namespace sessions | 77 } // namespace sessions |
| 81 } // namespace syncer | 78 } // namespace syncer |
| 82 | 79 |
| 83 #endif // SYNC_SESSIONS_MODEL_NEUTRAL_STATE_H_ | 80 #endif // SYNC_SESSIONS_MODEL_NEUTRAL_STATE_H_ |
| OLD | NEW |