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

Unified Diff: chrome/browser/password_manager/native_backend_kwallet_x.cc

Issue 316243002: Add date_synced to PasswordForm. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: +comment Created 6 years, 6 months 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
Index: chrome/browser/password_manager/native_backend_kwallet_x.cc
diff --git a/chrome/browser/password_manager/native_backend_kwallet_x.cc b/chrome/browser/password_manager/native_backend_kwallet_x.cc
index 08c23a98bdf26acc6bc0ebe77405e95ad7337eec..d8816e5756037955322a4dd46976c6ce33a85683 100644
--- a/chrome/browser/password_manager/native_backend_kwallet_x.cc
+++ b/chrome/browser/password_manager/native_backend_kwallet_x.cc
@@ -732,6 +732,7 @@ void NativeBackendKWallet::SerializeValue(const PasswordFormList& forms,
pickle->WriteInt(form->type);
pickle->WriteInt(form->times_used);
autofill::SerializeFormData(form->form_data, pickle);
+ pickle->WriteInt64(form->date_synced.ToInternalValue());
}
}
@@ -813,6 +814,15 @@ bool NativeBackendKWallet::DeserializeValueSize(const std::string& signon_realm,
form->type = static_cast<PasswordForm::Type>(type);
}
+ if (version > 2) {
+ int64 date_synced = 0;
+ if (!iter.ReadInt64(&date_synced)) {
+ LogDeserializationWarning(version, signon_realm, false);
+ return false;
+ }
+ form->date_synced = base::Time::FromInternalValue(date_synced);
+ }
+
forms->push_back(form.release());
}

Powered by Google App Engine
This is Rietveld 408576698