Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(370)

Unified Diff: chrome/browser/sync/sync_ui_util.cc

Issue 5159001: Rest of the autofill work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch uploaded to debug why try servers have problem applying this patch. Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/sync/profile_sync_service.cc ('k') | chrome/browser/sync/syncable/autofill_migration.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
}
}
« no previous file with comments | « chrome/browser/sync/profile_sync_service.cc ('k') | chrome/browser/sync/syncable/autofill_migration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698