| Index: chrome/browser/sync/sync_ui_util.cc
|
| diff --git a/chrome/browser/sync/sync_ui_util.cc b/chrome/browser/sync/sync_ui_util.cc
|
| index 2b20eda004441ee6e3cad70b278f721e46cc2408..b7d8d6594ba46ede77d74970772694064a4fda7a 100644
|
| --- a/chrome/browser/sync/sync_ui_util.cc
|
| +++ b/chrome/browser/sync/sync_ui_util.cc
|
| @@ -6,6 +6,8 @@
|
|
|
| #include "app/l10n_util.h"
|
| #include "base/i18n/number_formatting.h"
|
| +#include "base/i18n/time_formatting.h"
|
| +#include "base/string_util.h"
|
| #include "base/utf_string_conversions.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/sync/profile_sync_service.h"
|
| @@ -215,6 +217,15 @@ void AddIntSyncDetail(ListValue* details, const std::string& stat_name,
|
| details->Append(val);
|
| }
|
|
|
| +std::wstring ConstructTime(int64 time_in_int) {
|
| + base::Time time = base::Time::FromInternalValue(time_in_int);
|
| +
|
| + // If time is null the format function returns a time in 1969.
|
| + if (time.is_null())
|
| + return std::wstring();
|
| + return base::TimeFormatFriendlyDateAndTime(time);
|
| +}
|
| +
|
| std::string MakeSyncAuthErrorText(
|
| const GoogleServiceAuthError::State& state) {
|
| switch (state) {
|
| @@ -323,6 +334,28 @@ void ConstructAboutInformation(ProfileSyncService* service,
|
| val->SetString("group", ModelSafeGroupToString(it->second));
|
| routing_info->Append(val);
|
| }
|
| +
|
| + sync_ui_util::AddBoolSyncDetail(details,
|
| + "Autofill Migrated",
|
| + service->backend()->GetAutofillMigrationState() ==
|
| + syncable::MIGRATED);
|
| + syncable::AutofillMigrationDebugInfo info =
|
| + service->backend()->GetAutofillMigrationDebugInfo();
|
| +
|
| + sync_ui_util::AddIntSyncDetail(details,
|
| + "Bookmarks created during migration",
|
| + info.bookmarks_added_during_migration);
|
| + sync_ui_util::AddIntSyncDetail(details,
|
| + "Autofill entries created during migration",
|
| + info.autofill_entries_added_during_migration);
|
| + sync_ui_util::AddIntSyncDetail(details,
|
| + "Autofill Profiles created during migration",
|
| + info.autofill_profile_added_during_migration);
|
| +
|
| + DictionaryValue* val = new DictionaryValue;
|
| + val->SetString("stat_name", "Autofill Migration Time");
|
| + val->SetString("stat_value", ConstructTime(info.autofill_migration_time));
|
| + details->Append(val);
|
| }
|
| }
|
| }
|
|
|