| 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 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 sync_ui_util::AddStringSyncDetails(version_info, "Server URL", | 544 sync_ui_util::AddStringSyncDetails(version_info, "Server URL", |
| 545 service->sync_service_url().spec()); | 545 service->sync_service_url().spec()); |
| 546 | 546 |
| 547 ListValue* user_state = AddSyncDetailsSection(details, "Credentials"); | 547 ListValue* user_state = AddSyncDetailsSection(details, "Credentials"); |
| 548 sync_ui_util::AddStringSyncDetails(user_state, "Client ID", | 548 sync_ui_util::AddStringSyncDetails(user_state, "Client ID", |
| 549 full_status.unique_id.empty() ? "none" : full_status.unique_id); | 549 full_status.unique_id.empty() ? "none" : full_status.unique_id); |
| 550 sync_ui_util::AddStringSyncDetails( | 550 sync_ui_util::AddStringSyncDetails( |
| 551 user_state, "Username", | 551 user_state, "Username", |
| 552 service->signin() ? service->signin()->GetAuthenticatedUsername() : ""); | 552 service->signin() ? service->signin()->GetAuthenticatedUsername() : ""); |
| 553 sync_ui_util::AddBoolSyncDetail( | 553 sync_ui_util::AddBoolSyncDetail( |
| 554 user_state, "Sync Token Available", service->AreCredentialsAvailable()); | 554 user_state, "Sync Token Available", service->IsSyncTokenAvailable()); |
| 555 | 555 |
| 556 ListValue* local_state = AddSyncDetailsSection(details, "Local State"); | 556 ListValue* local_state = AddSyncDetailsSection(details, "Local State"); |
| 557 sync_ui_util::AddStringSyncDetails(local_state, "Last Synced", | 557 sync_ui_util::AddStringSyncDetails(local_state, "Last Synced", |
| 558 service->GetLastSyncedTimeString()); | 558 service->GetLastSyncedTimeString()); |
| 559 | 559 |
| 560 // Some global status indicators. These will change only in exceptional | 560 // Some global status indicators. These will change only in exceptional |
| 561 // circumstances, like encryption changes, new data types, throttling, etc. | 561 // circumstances, like encryption changes, new data types, throttling, etc. |
| 562 sync_ui_util::AddBoolSyncDetail(local_state, | 562 sync_ui_util::AddBoolSyncDetail(local_state, |
| 563 "Sync First-Time Setup Complete", | 563 "Sync First-Time Setup Complete", |
| 564 service->HasSyncSetupCompleted()); | 564 service->HasSyncSetupCompleted()); |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 787 } | 787 } |
| 788 } else { | 788 } else { |
| 789 version_modifier = " " + version_modifier; | 789 version_modifier = " " + version_modifier; |
| 790 } | 790 } |
| 791 return chrome_version.Name() + " " + chrome_version.OSType() + " " + | 791 return chrome_version.Name() + " " + chrome_version.OSType() + " " + |
| 792 chrome_version.Version() + " (" + chrome_version.LastChange() + ")" + | 792 chrome_version.Version() + " (" + chrome_version.LastChange() + ")" + |
| 793 version_modifier; | 793 version_modifier; |
| 794 } | 794 } |
| 795 | 795 |
| 796 } // namespace sync_ui_util | 796 } // namespace sync_ui_util |
| OLD | NEW |