OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef SYNC_INTERNAL_API_PUBLIC_ENGINE_STATUS_SUMMARY_H_ |
| 6 #define SYNC_INTERNAL_API_PUBLIC_ENGINE_STATUS_SUMMARY_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "sync/internal_api/public/syncable/model_type.h" |
| 11 #include "sync/protocol/sync_protocol_error.h" |
| 12 |
| 13 namespace sync_api { |
| 14 |
| 15 // Status encapsulates detailed state about the internals of the SyncManager. |
| 16 // |
| 17 // This struct is closely tied to the AllStatus object which uses instances of |
| 18 // it to track and report on the sync engine's internal state, and the functions |
| 19 // in sync_ui_util.cc which convert the contents of this struct into a |
| 20 // DictionaryValue used to populate the about:sync summary tab. |
| 21 struct SyncStatus { |
| 22 SyncStatus(); |
| 23 ~SyncStatus(); |
| 24 |
| 25 bool notifications_enabled; // True only if subscribed for notifications. |
| 26 |
| 27 // Notifications counters updated by the actions in synapi. |
| 28 int notifications_received; |
| 29 |
| 30 browser_sync::SyncProtocolError sync_protocol_error; |
| 31 |
| 32 // Number of encryption conflicts counted during most recent sync cycle. |
| 33 int encryption_conflicts; |
| 34 |
| 35 // Number of hierarchy conflicts counted during most recent sync cycle. |
| 36 int hierarchy_conflicts; |
| 37 |
| 38 // Number of simple conflicts counted during most recent sync cycle. |
| 39 int simple_conflicts; |
| 40 |
| 41 // Number of items the server refused to commit due to conflict during most |
| 42 // recent sync cycle. |
| 43 int server_conflicts; |
| 44 |
| 45 // Number of items successfully committed during most recent sync cycle. |
| 46 int committed_count; |
| 47 |
| 48 bool syncing; |
| 49 // True after a client has done a first sync. |
| 50 bool initial_sync_ended; |
| 51 |
| 52 // Total updates available. If zero, nothing left to download. |
| 53 int64 updates_available; |
| 54 // Total updates received by the syncer since browser start. |
| 55 int updates_received; |
| 56 // Total updates received that are echoes of our own changes. |
| 57 int reflected_updates_received; |
| 58 // Of updates_received, how many were tombstones. |
| 59 int tombstone_updates_received; |
| 60 |
| 61 // Total successful commits. |
| 62 int num_commits_total; |
| 63 |
| 64 // Total number of overwrites due to conflict resolver since browser start. |
| 65 int num_local_overwrites_total; |
| 66 int num_server_overwrites_total; |
| 67 |
| 68 // Count of empty and non empty getupdates; |
| 69 int nonempty_get_updates; |
| 70 int empty_get_updates; |
| 71 |
| 72 // Count of sync cycles that successfully committed items; |
| 73 int sync_cycles_with_commits; |
| 74 int sync_cycles_without_commits; |
| 75 |
| 76 // Count of useless and useful syncs we perform. |
| 77 int useless_sync_cycles; |
| 78 int useful_sync_cycles; |
| 79 |
| 80 // Encryption related. |
| 81 syncable::ModelTypeSet encrypted_types; |
| 82 bool cryptographer_ready; |
| 83 bool crypto_has_pending_keys; |
| 84 |
| 85 // Per-datatype throttled status. |
| 86 syncable::ModelTypeSet throttled_types; |
| 87 |
| 88 // The unique identifer for this client. |
| 89 std::string unique_id; |
| 90 }; |
| 91 |
| 92 } // namespace sync_api |
| 93 |
| 94 #endif // SYNC_INTERNAL_API_PUBLIC_ENGINE_STATUS_SUMMARY_H_ |
OLD | NEW |