Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(641)

Side by Side Diff: sync/internal_api/public/engine/sync_status.h

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_SYNC_STATUS_H_
6 #define SYNC_INTERNAL_API_PUBLIC_ENGINE_SYNC_STATUS_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/time/time.h"
12 #include "sync/base/sync_export.h"
13 #include "sync/internal_api/public/base/model_type.h"
14 #include "sync/internal_api/public/sync_encryption_handler.h"
15 #include "sync/protocol/sync_protocol_error.h"
16
17 namespace syncer {
18
19 // Status encapsulates detailed state about the internals of the SyncManager.
20 //
21 // This struct is closely tied to the AllStatus object which uses instances of
22 // it to track and report on the sync engine's internal state, and the functions
23 // in sync_ui_util.cc which convert the contents of this struct into a
24 // DictionaryValue used to populate the about:sync summary tab.
25 struct SYNC_EXPORT SyncStatus {
26 SyncStatus();
27 SyncStatus(const SyncStatus& other);
28 ~SyncStatus();
29
30 // TODO(akalin): Replace this with a NotificationsDisabledReason
31 // variable.
32 bool notifications_enabled; // True only if subscribed for notifications.
33
34 // Notifications counters updated by the actions in synapi.
35 int notifications_received;
36
37 SyncProtocolError sync_protocol_error;
38
39 // Number of encryption conflicts counted during most recent sync cycle.
40 int encryption_conflicts;
41
42 // Number of hierarchy conflicts counted during most recent sync cycle.
43 int hierarchy_conflicts;
44
45 // Number of items the server refused to commit due to conflict during most
46 // recent sync cycle.
47 int server_conflicts;
48
49 // Number of items successfully committed during most recent sync cycle.
50 int committed_count;
51
52 bool syncing;
53
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 // Nudge counts for each possible source
69 int nudge_source_notification;
70 int nudge_source_local;
71 int nudge_source_local_refresh;
72
73 // Encryption related.
74 ModelTypeSet encrypted_types;
75 bool cryptographer_ready;
76 bool crypto_has_pending_keys;
77 bool has_keystore_key;
78 base::Time keystore_migration_time;
79 PassphraseType passphrase_type;
80
81 // Per-datatype throttled status.
82 ModelTypeSet throttled_types;
83
84 // The unique identifer for the sync store.
85 std::string sync_id;
86
87 // The unique identifier for the invalidation client.
88 std::string invalidator_client_id;
89
90 // Counters grouped by model type
91 std::vector<int> num_entries_by_type;
92 std::vector<int> num_to_delete_entries_by_type;
93
94 // Time of next retry if sync scheduler is throttled or in backoff.
95 base::Time retry_time;
96 };
97
98 } // namespace syncer
99
100 #endif // SYNC_INTERNAL_API_PUBLIC_ENGINE_SYNC_STATUS_H_
OLDNEW
« no previous file with comments | « sync/internal_api/public/engine/polling_constants.cc ('k') | sync/internal_api/public/engine/sync_status.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698