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

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

Issue 2127533003: Remove PasswordForm::ssl_valid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adjust //ios Created 4 years, 5 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 a2346ba12db6c1fca79a7dc30db543aec6c78bb1..e2b63d13c1e5f75c156a45967f600affd055c840 100644
--- a/chrome/browser/password_manager/native_backend_kwallet_x.cc
+++ b/chrome/browser/password_manager/native_backend_kwallet_x.cc
@@ -36,7 +36,7 @@ namespace {
// In case the fields in the pickle ever change, version them so we can try to
// read old pickles. (Note: do not eat old pickles past the expiration date.)
-const int kPickleVersion = 8;
+const int kPickleVersion = 9;
// We could localize this string, but then changing your locale would cause
// you to lose access to all your stored passwords. Maybe best not to do that.
@@ -164,16 +164,24 @@ bool DeserializeValueSize(const std::string& signon_realm,
int generation_upload_status = 0;
// Note that these will be read back in the order listed due to
// short-circuit evaluation. This is important.
- if (!iter.ReadInt(&scheme) ||
- !ReadGURL(&iter, warn_only, &form->origin) ||
+ if (!iter.ReadInt(&scheme) || !ReadGURL(&iter, warn_only, &form->origin) ||
!ReadGURL(&iter, warn_only, &form->action) ||
!iter.ReadString16(&form->username_element) ||
!iter.ReadString16(&form->username_value) ||
!iter.ReadString16(&form->password_element) ||
!iter.ReadString16(&form->password_value) ||
- !iter.ReadString16(&form->submit_element) ||
- !iter.ReadBool(&form->ssl_valid) ||
- !iter.ReadBool(&form->preferred) ||
+ !iter.ReadString16(&form->submit_element)) {
+ LogDeserializationWarning(version, signon_realm, warn_only);
+ return false;
+ }
+ if (version <= 8) {
+ bool dummy_unused_flag = false;
+ if (!iter.ReadBool(&dummy_unused_flag)) {
+ LogDeserializationWarning(version, signon_realm, warn_only);
+ return false;
+ }
+ }
+ if (!iter.ReadBool(&form->preferred) ||
!iter.ReadBool(&form->blacklisted_by_user) ||
!iter.ReadInt64(&date_created)) {
LogDeserializationWarning(version, signon_realm, warn_only);
@@ -254,7 +262,6 @@ void SerializeValue(const std::vector<autofill::PasswordForm*>& forms,
pickle->WriteString16(form->password_element);
pickle->WriteString16(form->password_value);
pickle->WriteString16(form->submit_element);
- pickle->WriteBool(form->ssl_valid);
pickle->WriteBool(form->preferred);
pickle->WriteBool(form->blacklisted_by_user);
pickle->WriteInt64(form->date_created.ToInternalValue());

Powered by Google App Engine
This is Rietveld 408576698