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

Side by Side Diff: chrome/browser/sync/internal_api/sync_manager.h

Issue 9323015: [Sync] - In about:sync page display if the first sync after restart has taken place or not. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For review. Created 8 years, 10 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 | Annotate | Revision Log
OLDNEW
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
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,
107 // Can't connect to server, and we haven't completed the initial 109 // Can't connect to server.
rlarocque 2012/02/03 18:55:03 If we're going to change the meaning of an enum, w
lipalani1 2012/02/07 23:34:11 Done.
108 // sync yet. So there's nothing we can do but wait for the server. 110 // The state indicates there are no pending changes but
111 // the client is possibly trying to sync because of a notification.
109 OFFLINE_UNUSABLE, 112 OFFLINE_UNUSABLE,
110 113
111 SUMMARY_STATUS_COUNT, 114 SUMMARY_STATUS_COUNT,
112 }; 115 };
113 116
114 Status(); 117 Status();
115 ~Status(); 118 ~Status();
116 119
117 Summary summary; 120 Summary summary;
118 bool authenticated; // Successfully authenticated via GAIA. 121 bool authenticated; // Successfully authenticated via GAIA.
(...skipping 30 matching lines...) Expand all
149 int tombstone_updates_received; 152 int tombstone_updates_received;
150 153
151 // Total number of overwrites due to conflict resolver since browser start. 154 // Total number of overwrites due to conflict resolver since browser start.
152 int num_local_overwrites_total; 155 int num_local_overwrites_total;
153 int num_server_overwrites_total; 156 int num_server_overwrites_total;
154 157
155 // Count of empty and non empty getupdates; 158 // Count of empty and non empty getupdates;
156 int nonempty_get_updates; 159 int nonempty_get_updates;
157 int empty_get_updates; 160 int empty_get_updates;
158 161
162 // Number of sync cycles.
163 int sync_count;
164
159 // Count of useless and useful syncs we perform. 165 // Count of useless and useful syncs we perform.
160 int useless_sync_cycles; 166 int useless_sync_cycles;
161 int useful_sync_cycles; 167 int useful_sync_cycles;
162 168
163 // Encryption related. 169 // Encryption related.
164 syncable::ModelTypeSet encrypted_types; 170 syncable::ModelTypeSet encrypted_types;
165 bool cryptographer_ready; 171 bool cryptographer_ready;
166 bool crypto_has_pending_keys; 172 bool crypto_has_pending_keys;
167 173
168 // The unique identifer for this client. 174 // The unique identifer for this client.
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 syncable::ModelTypeSet GetTypesWithEmptyProgressMarkerToken( 623 syncable::ModelTypeSet GetTypesWithEmptyProgressMarkerToken(
618 syncable::ModelTypeSet types, 624 syncable::ModelTypeSet types,
619 sync_api::UserShare* share); 625 sync_api::UserShare* share);
620 626
621 // Returns the string representation of a PassphraseRequiredReason value. 627 // Returns the string representation of a PassphraseRequiredReason value.
622 std::string PassphraseRequiredReasonToString(PassphraseRequiredReason reason); 628 std::string PassphraseRequiredReasonToString(PassphraseRequiredReason reason);
623 629
624 } // namespace sync_api 630 } // namespace sync_api
625 631
626 #endif // CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_ 632 #endif // CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/engine/all_status.cc ('k') | chrome/browser/sync/internal_api/sync_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698