| 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..790474ed575b800aacbd78d66b18760b2bea3bec 100644
|
| --- a/chrome/browser/sync/sync_ui_util.cc
|
| +++ b/chrome/browser/sync/sync_ui_util.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include "app/l10n_util.h"
|
| #include "base/i18n/number_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 +216,26 @@ void AddIntSyncDetail(ListValue* details, const std::string& stat_name,
|
| details->Append(val);
|
| }
|
|
|
| +std::string ConstructTime(int64 time_in_int) {
|
| + base::Time time = base::Time::FromTimeT(time_in_int);
|
| + if (time.is_null())
|
| + return string();
|
| + base::Time::Exploded exploded;
|
| + time.LocalExplode(&exploded);
|
| +
|
| + std::string time_in_string;
|
| + time_in_string.append(UTF16ToUTF8(
|
| + base::FormatNumber(static_cast<int64>(exploded.month))));
|
| + time_in_string.append("-");
|
| + time_in_string.append(UTF16ToUTF8(base::FormatNumber(
|
| + static_cast<int64>(exploded.day_of_month))));
|
| + time_in_string.append("-");
|
| + time_in_string.append(UTF16ToUTF8(base::FormatNumber(
|
| + static_cast<int64>(exploded.year))));
|
| +
|
| + return time_in_string;
|
| +}
|
| +
|
| std::string MakeSyncAuthErrorText(
|
| const GoogleServiceAuthError::State& state) {
|
| switch (state) {
|
| @@ -323,6 +344,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::Directory::PersistedKernelInfo::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);
|
| }
|
| }
|
| }
|
|
|