| Index: components/autofill/core/common/form_data.cc
|
| diff --git a/components/autofill/core/common/form_data.cc b/components/autofill/core/common/form_data.cc
|
| index b720ae402ea4b72b049c1ce48df529dabc1c7a2a..aa3ba5eab196b1ff3dbdc64717f5edad0257c206 100644
|
| --- a/components/autofill/core/common/form_data.cc
|
| +++ b/components/autofill/core/common/form_data.cc
|
| @@ -64,6 +64,8 @@ FormData::FormData(const FormData& data)
|
| origin(data.origin),
|
| action(data.action),
|
| user_submitted(data.user_submitted),
|
| + username(data.username),
|
| + password(data.password),
|
| fields(data.fields) {
|
| }
|
|
|
| @@ -71,11 +73,9 @@ FormData::~FormData() {
|
| }
|
|
|
| bool FormData::operator==(const FormData& form) const {
|
| - return name == form.name &&
|
| - origin == form.origin &&
|
| - action == form.action &&
|
| - user_submitted == form.user_submitted &&
|
| - fields == form.fields;
|
| + return name == form.name && origin == form.origin && action == form.action &&
|
| + user_submitted == form.user_submitted && username == form.username &&
|
| + password == form.password && fields == form.fields;
|
| }
|
|
|
| bool FormData::operator!=(const FormData& form) const {
|
| @@ -95,10 +95,9 @@ bool FormData::operator<(const FormData& form) const {
|
| }
|
|
|
| std::ostream& operator<<(std::ostream& os, const FormData& form) {
|
| - os << base::UTF16ToUTF8(form.name) << " "
|
| - << form.origin << " "
|
| - << form.action << " "
|
| - << form.user_submitted << " "
|
| + os << base::UTF16ToUTF8(form.name) << " " << form.origin << " " << form.action
|
| + << " " << form.user_submitted << " " << form.username << " "
|
| + << form.password << " "
|
| << "Fields:";
|
| for (size_t i = 0; i < form.fields.size(); ++i) {
|
| os << form.fields[i] << ",";
|
| @@ -112,6 +111,8 @@ void SerializeFormData(const FormData& form_data, Pickle* pickle) {
|
| pickle->WriteString(form_data.origin.spec());
|
| pickle->WriteString(form_data.action.spec());
|
| pickle->WriteBool(form_data.user_submitted);
|
| + SerializeFormFieldData(form_data.username, pickle);
|
| + SerializeFormFieldData(form_data.password, pickle);
|
| SerializeFormFieldDataVector(form_data.fields, pickle);
|
| }
|
|
|
| @@ -126,10 +127,11 @@ bool DeserializeFormData(PickleIterator* iter, FormData* form_data) {
|
| case 1: {
|
| base::string16 method;
|
| if (!iter->ReadString16(&form_data->name) ||
|
| - !iter->ReadString16(&method) ||
|
| - !ReadGURL(iter, &form_data->origin) ||
|
| + !iter->ReadString16(&method) || !ReadGURL(iter, &form_data->origin) ||
|
| !ReadGURL(iter, &form_data->action) ||
|
| !iter->ReadBool(&form_data->user_submitted) ||
|
| + !DeserializeFormFieldData(iter, &form_data->username) ||
|
| + !DeserializeFormFieldData(iter, &form_data->password) ||
|
| !DeserializeFormFieldDataVector(iter, &form_data->fields)) {
|
| LogDeserializationError(version);
|
| return false;
|
| @@ -141,6 +143,8 @@ bool DeserializeFormData(PickleIterator* iter, FormData* form_data) {
|
| !ReadGURL(iter, &form_data->origin) ||
|
| !ReadGURL(iter, &form_data->action) ||
|
| !iter->ReadBool(&form_data->user_submitted) ||
|
| + !DeserializeFormFieldData(iter, &form_data->username) ||
|
| + !DeserializeFormFieldData(iter, &form_data->password) ||
|
| !DeserializeFormFieldDataVector(iter, &form_data->fields)) {
|
| LogDeserializationError(version);
|
| return false;
|
|
|