| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 // Status encapsulates detailed state about the internals of the SyncManager. | 87 // Status encapsulates detailed state about the internals of the SyncManager. |
| 88 struct Status { | 88 struct Status { |
| 89 // Summary is a distilled set of important information that the end-user may | 89 // Summary is a distilled set of important information that the end-user may |
| 90 // wish to be informed about (through UI, for example). Note that if a | 90 // wish to be informed about (through UI, for example). Note that if a |
| 91 // summary state requires user interaction (such as auth failures), more | 91 // summary state requires user interaction (such as auth failures), more |
| 92 // detailed information may be contained in additional status fields. | 92 // detailed information may be contained in additional status fields. |
| 93 enum Summary { | 93 enum Summary { |
| 94 // The internal instance is in an unrecognizable state. This should not | 94 // The internal instance is in an unrecognizable state. This should not |
| 95 // happen. | 95 // happen. |
| 96 INVALID = 0, | 96 INVALID = 0, |
| 97 // A sync has not happened since restart. |
| 98 UNINITIALIZED, |
| 97 // Can't connect to server, but there are no pending changes in | 99 // Can't connect to server, but there are no pending changes in |
| 98 // our local cache. | 100 // our local cache. |
| 99 OFFLINE, | 101 OFFLINE, |
| 100 // Can't connect to server, and there are pending changes in our | 102 // Can't connect to server, and there are pending changes in our |
| 101 // local cache. | 103 // local cache. |
| 102 OFFLINE_UNSYNCED, | 104 OFFLINE_UNSYNCED, |
| 103 // Connected and syncing. | 105 // Connected and syncing. |
| 104 SYNCING, | 106 SYNCING, |
| 105 // Connected, no pending changes. | 107 // Connected, no pending changes. |
| 106 READY, | 108 READY, |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 int tombstone_updates_received; | 151 int tombstone_updates_received; |
| 150 | 152 |
| 151 // Total number of overwrites due to conflict resolver since browser start. | 153 // Total number of overwrites due to conflict resolver since browser start. |
| 152 int num_local_overwrites_total; | 154 int num_local_overwrites_total; |
| 153 int num_server_overwrites_total; | 155 int num_server_overwrites_total; |
| 154 | 156 |
| 155 // Count of empty and non empty getupdates; | 157 // Count of empty and non empty getupdates; |
| 156 int nonempty_get_updates; | 158 int nonempty_get_updates; |
| 157 int empty_get_updates; | 159 int empty_get_updates; |
| 158 | 160 |
| 161 // Number of sync cycles. |
| 162 int sync_count; |
| 163 |
| 159 // Count of useless and useful syncs we perform. | 164 // Count of useless and useful syncs we perform. |
| 160 int useless_sync_cycles; | 165 int useless_sync_cycles; |
| 161 int useful_sync_cycles; | 166 int useful_sync_cycles; |
| 162 | 167 |
| 163 // Encryption related. | 168 // Encryption related. |
| 164 syncable::ModelTypeSet encrypted_types; | 169 syncable::ModelTypeSet encrypted_types; |
| 165 bool cryptographer_ready; | 170 bool cryptographer_ready; |
| 166 bool crypto_has_pending_keys; | 171 bool crypto_has_pending_keys; |
| 167 | 172 |
| 168 // The unique identifer for this client. | 173 // The unique identifer for this client. |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 syncable::ModelTypeSet GetTypesWithEmptyProgressMarkerToken( | 622 syncable::ModelTypeSet GetTypesWithEmptyProgressMarkerToken( |
| 618 syncable::ModelTypeSet types, | 623 syncable::ModelTypeSet types, |
| 619 sync_api::UserShare* share); | 624 sync_api::UserShare* share); |
| 620 | 625 |
| 621 // Returns the string representation of a PassphraseRequiredReason value. | 626 // Returns the string representation of a PassphraseRequiredReason value. |
| 622 std::string PassphraseRequiredReasonToString(PassphraseRequiredReason reason); | 627 std::string PassphraseRequiredReasonToString(PassphraseRequiredReason reason); |
| 623 | 628 |
| 624 } // namespace sync_api | 629 } // namespace sync_api |
| 625 | 630 |
| 626 #endif // CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 631 #endif // CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
| OLD | NEW |