| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/sync_ui_util.h" | 5 #include "chrome/browser/sync/sync_ui_util.h" |
| 6 | 6 |
| 7 #include "base/i18n/number_formatting.h" | 7 #include "base/i18n/number_formatting.h" |
| 8 #include "base/i18n/time_formatting.h" | 8 #include "base/i18n/time_formatting.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 full_status.empty_get_updates); | 418 full_status.empty_get_updates); |
| 419 sync_ui_util::AddIntSyncDetail(details, | 419 sync_ui_util::AddIntSyncDetail(details, |
| 420 "Nonempty GetUpdates", | 420 "Nonempty GetUpdates", |
| 421 full_status.nonempty_get_updates); | 421 full_status.nonempty_get_updates); |
| 422 sync_ui_util::AddIntSyncDetail(details, | 422 sync_ui_util::AddIntSyncDetail(details, |
| 423 "Useless Sync Cycles", | 423 "Useless Sync Cycles", |
| 424 full_status.useless_sync_cycles); | 424 full_status.useless_sync_cycles); |
| 425 sync_ui_util::AddIntSyncDetail(details, | 425 sync_ui_util::AddIntSyncDetail(details, |
| 426 "Useful Sync Cycles", | 426 "Useful Sync Cycles", |
| 427 full_status.useful_sync_cycles); | 427 full_status.useful_sync_cycles); |
| 428 sync_ui_util::AddBoolSyncDetail(details, |
| 429 "Explicit Passphrase", |
| 430 service->IsUsingSecondaryPassphrase()); |
| 431 sync_ui_util::AddBoolSyncDetail(details, |
| 432 "Passphrase Required", |
| 433 service->IsPassphraseRequired()); |
| 434 sync_ui_util::AddBoolSyncDetail(details, |
| 435 "Cryptographer Ready", |
| 436 full_status.cryptographer_ready); |
| 437 sync_ui_util::AddBoolSyncDetail(details, |
| 438 "Cryptographer Has Pending Keys", |
| 439 full_status.crypto_has_pending_keys); |
| 440 sync_ui_util::AddStringSyncDetails(details, |
| 441 "Encrypted Types", |
| 442 full_status.encrypted_types); |
| 428 | 443 |
| 429 const browser_sync::sessions::SyncSessionSnapshot* snapshot = | 444 const browser_sync::sessions::SyncSessionSnapshot* snapshot = |
| 430 service->sync_initialized() ? | 445 service->sync_initialized() ? |
| 431 service->GetLastSessionSnapshot() : NULL; | 446 service->GetLastSessionSnapshot() : NULL; |
| 432 | 447 |
| 433 // |snapshot| could be NULL if sync is not yet initialized. | 448 // |snapshot| could be NULL if sync is not yet initialized. |
| 434 if (snapshot) { | 449 if (snapshot) { |
| 435 sync_ui_util::AddIntSyncDetail(details, "Download Count (This Session)", | 450 sync_ui_util::AddIntSyncDetail(details, "Download Count (This Session)", |
| 436 snapshot->syncer_status.num_updates_downloaded_total); | 451 snapshot->syncer_status.num_updates_downloaded_total); |
| 437 sync_ui_util::AddIntSyncDetail(details, "Commit Count (This Session)", | 452 sync_ui_util::AddIntSyncDetail(details, "Commit Count (This Session)", |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 DictionaryValue* val = new DictionaryValue; | 486 DictionaryValue* val = new DictionaryValue; |
| 472 val->SetString("model_type", ModelTypeToString(it->first)); | 487 val->SetString("model_type", ModelTypeToString(it->first)); |
| 473 val->SetString("group", ModelSafeGroupToString(it->second)); | 488 val->SetString("group", ModelSafeGroupToString(it->second)); |
| 474 routing_info->Append(val); | 489 routing_info->Append(val); |
| 475 } | 490 } |
| 476 } | 491 } |
| 477 } | 492 } |
| 478 } | 493 } |
| 479 | 494 |
| 480 } // namespace sync_ui_util | 495 } // namespace sync_ui_util |
| OLD | NEW |