OLD | NEW |
---|---|
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/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 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
642 | 642 |
643 // |snapshot| could be NULL if sync is not yet initialized. | 643 // |snapshot| could be NULL if sync is not yet initialized. |
644 if (snapshot) { | 644 if (snapshot) { |
645 sync_ui_util::AddIntSyncDetail(details, "Download Count (This Session)", | 645 sync_ui_util::AddIntSyncDetail(details, "Download Count (This Session)", |
646 snapshot->syncer_status.num_updates_downloaded_total); | 646 snapshot->syncer_status.num_updates_downloaded_total); |
647 sync_ui_util::AddIntSyncDetail(details, "Commit Count (This Session)", | 647 sync_ui_util::AddIntSyncDetail(details, "Commit Count (This Session)", |
648 snapshot->syncer_status.num_successful_commits); | 648 snapshot->syncer_status.num_successful_commits); |
649 sync_ui_util::AddStringSyncDetails(details, "Last Sync Source", | 649 sync_ui_util::AddStringSyncDetails(details, "Last Sync Source", |
650 browser_sync::GetUpdatesSourceString( | 650 browser_sync::GetUpdatesSourceString( |
651 snapshot->source.updates_source)); | 651 snapshot->source.updates_source)); |
652 sync_ui_util::AddStringSyncDetails( | |
rlarocque
2012/02/22 22:01:52
Note: There are two snapshot-like structures avail
lipalani1
2012/02/22 22:09:24
That part is fine. But is there any value in cachi
rlarocque
2012/02/22 22:22:37
There would be some value, but I don't think it's
| |
653 details, "Last Sync's GetUpdates Result", | |
654 GetSyncerErrorString(snapshot->errors.last_download_updates_result)); | |
655 sync_ui_util::AddStringSyncDetails( | |
656 details, "Last Sync's Post Commit Result", | |
657 GetSyncerErrorString(snapshot->errors.last_post_commit_result)); | |
658 sync_ui_util::AddStringSyncDetails( | |
659 details, "Last Sync's Process Commit Response Result", | |
660 GetSyncerErrorString( | |
661 snapshot->errors.last_process_commit_response_result)); | |
652 | 662 |
653 // Print the count of entries from snapshot. Warning: This might be | 663 // Print the count of entries from snapshot. Warning: This might be |
654 // slightly out of date if there are client side changes that are yet | 664 // slightly out of date if there are client side changes that are yet |
655 // unsynced However if we query the latest count here we will | 665 // unsynced However if we query the latest count here we will |
656 // have to hold the transaction which means we cannot display this page | 666 // have to hold the transaction which means we cannot display this page |
657 // when syncing. | 667 // when syncing. |
658 sync_ui_util::AddIntSyncDetail(details, "Entries" , | 668 sync_ui_util::AddIntSyncDetail(details, "Entries" , |
659 snapshot->num_entries); | 669 snapshot->num_entries); |
660 sync_ui_util::AddBoolSyncDetail(details, "Throttled", | 670 sync_ui_util::AddBoolSyncDetail(details, "Throttled", |
661 snapshot->is_silenced); | 671 snapshot->is_silenced); |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
729 } | 739 } |
730 } else { | 740 } else { |
731 version_modifier = " " + version_modifier; | 741 version_modifier = " " + version_modifier; |
732 } | 742 } |
733 return chrome_version.Name() + " " + chrome_version.OSType() + " " + | 743 return chrome_version.Name() + " " + chrome_version.OSType() + " " + |
734 chrome_version.Version() + " (" + chrome_version.LastChange() + ")" + | 744 chrome_version.Version() + " (" + chrome_version.LastChange() + ")" + |
735 version_modifier; | 745 version_modifier; |
736 } | 746 } |
737 | 747 |
738 } // namespace sync_ui_util | 748 } // namespace sync_ui_util |
OLD | NEW |