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