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

Side by Side Diff: chrome/browser/sync/about_sync_util.cc

Issue 10455012: [Sync] Add support for performing a GetKey on startup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fred's comments Created 8 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 | 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 #include "chrome/browser/sync/about_sync_util.h" 5 #include "chrome/browser/sync/about_sync_util.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/string16.h" 9 #include "base/string16.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 "Passphrase Required"); 190 "Passphrase Required");
191 BoolSyncStat is_cryptographer_ready(section_encryption, 191 BoolSyncStat is_cryptographer_ready(section_encryption,
192 "Cryptographer Ready"); 192 "Cryptographer Ready");
193 BoolSyncStat has_pending_keys(section_encryption, 193 BoolSyncStat has_pending_keys(section_encryption,
194 "Cryptographer Has Pending Keys"); 194 "Cryptographer Has Pending Keys");
195 StringSyncStat encrypted_types(section_encryption, "Encrypted Types"); 195 StringSyncStat encrypted_types(section_encryption, "Encrypted Types");
196 196
197 ListValue* section_last_session = AddSection( 197 ListValue* section_last_session = AddSection(
198 stats_list, "Status from Last Completed Session"); 198 stats_list, "Status from Last Completed Session");
199 StringSyncStat session_source(section_last_session, "Sync Source"); 199 StringSyncStat session_source(section_last_session, "Sync Source");
200 StringSyncStat get_key_result(section_last_session, "GetKey Step Result");
200 StringSyncStat download_result(section_last_session, "Download Step Result"); 201 StringSyncStat download_result(section_last_session, "Download Step Result");
201 StringSyncStat commit_result(section_last_session, "Commit Step Result"); 202 StringSyncStat commit_result(section_last_session, "Commit Step Result");
202 203
203 ListValue* section_counters = AddSection(stats_list, "Running Totals"); 204 ListValue* section_counters = AddSection(stats_list, "Running Totals");
204 IntSyncStat notifications_received(section_counters, 205 IntSyncStat notifications_received(section_counters,
205 "Notifications Received"); 206 "Notifications Received");
206 IntSyncStat empty_get_updates(section_counters, "Cycles Without Updates"); 207 IntSyncStat empty_get_updates(section_counters, "Cycles Without Updates");
207 IntSyncStat non_empty_get_updates(section_counters, "Cycles With Updated"); 208 IntSyncStat non_empty_get_updates(section_counters, "Cycles With Updated");
208 IntSyncStat sync_cycles_without_commits(section_counters, 209 IntSyncStat sync_cycles_without_commits(section_counters,
209 "Cycles Without Commits"); 210 "Cycles Without Commits");
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 if (is_status_valid) { 291 if (is_status_valid) {
291 is_cryptographer_ready.SetValue(full_status.cryptographer_ready); 292 is_cryptographer_ready.SetValue(full_status.cryptographer_ready);
292 has_pending_keys.SetValue(full_status.crypto_has_pending_keys); 293 has_pending_keys.SetValue(full_status.crypto_has_pending_keys);
293 encrypted_types.SetValue( 294 encrypted_types.SetValue(
294 ModelTypeSetToString(full_status.encrypted_types)); 295 ModelTypeSetToString(full_status.encrypted_types));
295 } 296 }
296 297
297 if (snapshot.is_initialized()) { 298 if (snapshot.is_initialized()) {
298 session_source.SetValue( 299 session_source.SetValue(
299 syncer::GetUpdatesSourceString(snapshot.source().updates_source)); 300 syncer::GetUpdatesSourceString(snapshot.source().updates_source));
301 get_key_result.SetValue(
302 GetSyncerErrorString(
303 snapshot.model_neutral_state().last_get_key_result));
300 download_result.SetValue( 304 download_result.SetValue(
301 GetSyncerErrorString( 305 GetSyncerErrorString(
302 snapshot.model_neutral_state().last_download_updates_result)); 306 snapshot.model_neutral_state().last_download_updates_result));
303 commit_result.SetValue( 307 commit_result.SetValue(
304 GetSyncerErrorString( 308 GetSyncerErrorString(
305 snapshot.model_neutral_state().commit_result)); 309 snapshot.model_neutral_state().commit_result));
306 } 310 }
307 311
308 if (is_status_valid) { 312 if (is_status_valid) {
309 notifications_received.SetValue(full_status.notifications_received); 313 notifications_received.SetValue(full_status.notifications_received);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 about_info->SetString("unrecoverable_error_message", 392 about_info->SetString("unrecoverable_error_message",
389 unrecoverable_error_message); 393 unrecoverable_error_message);
390 } 394 }
391 395
392 about_info->Set("type_status", service->GetTypeStatusMap()); 396 about_info->Set("type_status", service->GetTypeStatusMap());
393 397
394 return about_info.Pass(); 398 return about_info.Pass();
395 } 399 }
396 400
397 } // namespace sync_ui_util 401 } // namespace sync_ui_util
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/glue/sync_backend_host.cc » ('j') | chrome/browser/sync/glue/sync_backend_host.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698