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 CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
6 #define CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 6 #define CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 // Can't connect to server, but there are no pending changes in | 97 // Can't connect to server, but there are no pending changes in |
98 // our local cache. | 98 // our local cache. |
99 OFFLINE, | 99 OFFLINE, |
100 // Can't connect to server, and there are pending changes in our | 100 // Can't connect to server, and there are pending changes in our |
101 // local cache. | 101 // local cache. |
102 OFFLINE_UNSYNCED, | 102 OFFLINE_UNSYNCED, |
103 // Connected and syncing. | 103 // Connected and syncing. |
104 SYNCING, | 104 SYNCING, |
105 // Connected, no pending changes. | 105 // Connected, no pending changes. |
106 READY, | 106 READY, |
107 // Internal sync error. | |
108 CONFLICT, | |
109 // Can't connect to server, and we haven't completed the initial | 107 // Can't connect to server, and we haven't completed the initial |
110 // sync yet. So there's nothing we can do but wait for the server. | 108 // sync yet. So there's nothing we can do but wait for the server. |
111 OFFLINE_UNUSABLE, | 109 OFFLINE_UNUSABLE, |
112 | 110 |
113 SUMMARY_STATUS_COUNT, | 111 SUMMARY_STATUS_COUNT, |
114 }; | 112 }; |
115 | 113 |
116 Status(); | 114 Status(); |
117 ~Status(); | 115 ~Status(); |
118 | 116 |
119 Summary summary; | 117 Summary summary; |
120 bool authenticated; // Successfully authenticated via GAIA. | 118 bool authenticated; // Successfully authenticated via GAIA. |
121 bool server_up; // True if we have received at least one good | 119 bool server_up; // True if we have received at least one good |
122 // reply from the server. | 120 // reply from the server. |
123 bool server_reachable; // True if we received any reply from the server. | 121 bool server_reachable; // True if we received any reply from the server. |
124 bool server_broken; // True of the syncer is stopped because of server | |
125 // issues. | |
126 bool notifications_enabled; // True only if subscribed for notifications. | 122 bool notifications_enabled; // True only if subscribed for notifications. |
127 | 123 |
128 // Notifications counters updated by the actions in synapi. | 124 // Notifications counters updated by the actions in synapi. |
129 int notifications_received; | 125 int notifications_received; |
130 int notifiable_commits; | 126 int notifiable_commits; |
131 | 127 |
132 // The max number of consecutive errors from any component. | 128 // The max number of consecutive errors from any component. |
133 int max_consecutive_errors; | 129 int max_consecutive_errors; |
134 | 130 |
135 browser_sync::SyncProtocolError sync_protocol_error; | 131 browser_sync::SyncProtocolError sync_protocol_error; |
136 | 132 |
| 133 // Number of unsynced items counted at the start of most recent sync cycle. |
137 int unsynced_count; | 134 int unsynced_count; |
138 | 135 |
| 136 // Number of conflicting items counted during most recent sync cycle. |
139 int conflicting_count; | 137 int conflicting_count; |
| 138 |
140 bool syncing; | 139 bool syncing; |
141 // True after a client has done a first sync. | 140 // True after a client has done a first sync. |
142 bool initial_sync_ended; | 141 bool initial_sync_ended; |
143 // True if any syncer is stuck. | |
144 bool syncer_stuck; | |
145 | 142 |
146 // Total updates available. If zero, nothing left to download. | 143 // Total updates available. If zero, nothing left to download. |
147 int64 updates_available; | 144 int64 updates_available; |
148 // Total updates received by the syncer since browser start. | 145 // Total updates received by the syncer since browser start. |
149 int updates_received; | 146 int updates_received; |
150 | 147 |
151 // Of updates_received, how many were tombstones. | 148 // Of updates_received, how many were tombstones. |
152 int tombstone_updates_received; | 149 int tombstone_updates_received; |
153 bool disk_full; | |
154 | 150 |
155 // Total number of overwrites due to conflict resolver since browser start. | 151 // Total number of overwrites due to conflict resolver since browser start. |
156 int num_local_overwrites_total; | 152 int num_local_overwrites_total; |
157 int num_server_overwrites_total; | 153 int num_server_overwrites_total; |
158 | 154 |
159 // Count of empty and non empty getupdates; | 155 // Count of empty and non empty getupdates; |
160 int nonempty_get_updates; | 156 int nonempty_get_updates; |
161 int empty_get_updates; | 157 int empty_get_updates; |
162 | 158 |
163 // Count of useless and useful syncs we perform. | 159 // Count of useless and useful syncs we perform. |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 syncable::ModelTypeSet GetTypesWithEmptyProgressMarkerToken( | 617 syncable::ModelTypeSet GetTypesWithEmptyProgressMarkerToken( |
622 syncable::ModelTypeSet types, | 618 syncable::ModelTypeSet types, |
623 sync_api::UserShare* share); | 619 sync_api::UserShare* share); |
624 | 620 |
625 // Returns the string representation of a PassphraseRequiredReason value. | 621 // Returns the string representation of a PassphraseRequiredReason value. |
626 std::string PassphraseRequiredReasonToString(PassphraseRequiredReason reason); | 622 std::string PassphraseRequiredReasonToString(PassphraseRequiredReason reason); |
627 | 623 |
628 } // namespace sync_api | 624 } // namespace sync_api |
629 | 625 |
630 #endif // CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 626 #endif // CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
OLD | NEW |