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

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

Issue 459103005: Introduce new PasswordForm attributes for Credential Management API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Mike's comment Created 6 years, 4 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 ca346cd0d66ebedc512ed0008f3bd2bf5c7407d1..f2fb6be103a72c3ed7b9eb67140141f8bd7e802f 100644
--- a/chrome/browser/password_manager/native_backend_kwallet_x.cc
+++ b/chrome/browser/password_manager/native_backend_kwallet_x.cc
@@ -727,6 +727,10 @@ void NativeBackendKWallet::SerializeValue(const PasswordFormList& forms,
pickle->WriteInt(form->times_used);
autofill::SerializeFormData(form->form_data, pickle);
pickle->WriteInt64(form->date_synced.ToInternalValue());
+ pickle->WriteString16(form->display_name);
+ pickle->WriteString(form->avatar_url.spec());
+ pickle->WriteString(form->federation_url.spec());
+ pickle->WriteBool(form->is_zero_click);
}
}
@@ -817,6 +821,16 @@ bool NativeBackendKWallet::DeserializeValueSize(const std::string& signon_realm,
form->date_synced = base::Time::FromInternalValue(date_synced);
}
+ if (version > 3) {
+ if (!iter.ReadString16(&form->display_name) ||
+ !ReadGURL(&iter, warn_only, &form->avatar_url) ||
+ !ReadGURL(&iter, warn_only, &form->federation_url) ||
+ !iter.ReadBool(&form->is_zero_click)) {
+ LogDeserializationWarning(version, signon_realm, false);
+ return false;
+ }
+ }
+
forms->push_back(form.release());
}

Powered by Google App Engine
This is Rietveld 408576698