Chromium Code Reviews| Index: components/autofill/core/common/form_field_data.cc |
| diff --git a/components/autofill/core/common/form_field_data.cc b/components/autofill/core/common/form_field_data.cc |
| index 3b80be255c4e99ea5f8e181842b5060e5a7f7336..28017656eaa42557f3cc04ad4156a28c50074cac 100644 |
| --- a/components/autofill/core/common/form_field_data.cc |
| +++ b/components/autofill/core/common/form_field_data.cc |
| @@ -10,7 +10,7 @@ |
| namespace { |
| -const int kPickleVersion = 1; |
| +const int kPickleVersion = 2; |
|
vabr (Chromium)
2015/01/20 11:19:57
Please add a big fat warning to bump the version i
|
| void AddVectorToPickle(std::vector<base::string16> strings, |
| Pickle* pickle) { |
| @@ -156,6 +156,26 @@ bool DeserializeFormFieldData(PickleIterator* iter, |
| !iter->ReadBool(&field_data->is_checkable) || |
| !iter->ReadBool(&field_data->is_focusable) || |
| !iter->ReadBool(&field_data->should_autocomplete) || |
| + !ReadAsInt(iter, &field_data->text_direction) || |
| + !ReadStringVector(iter, &field_data->option_values) || |
| + !ReadStringVector(iter, &field_data->option_contents)) { |
| + LOG(ERROR) << "Could not deserialize FormFieldData from pickle"; |
| + return false; |
| + } |
| + break; |
| + } |
| + case 2: { |
| + if (!iter->ReadString16(&field_data->label) || |
| + !iter->ReadString16(&field_data->name) || |
| + !iter->ReadString16(&field_data->value) || |
| + !iter->ReadString(&field_data->form_control_type) || |
| + !iter->ReadString(&field_data->autocomplete_attribute) || |
| + !iter->ReadSizeT(&field_data->max_length) || |
| + !iter->ReadBool(&field_data->is_autofilled) || |
| + !iter->ReadBool(&field_data->is_checked) || |
| + !iter->ReadBool(&field_data->is_checkable) || |
| + !iter->ReadBool(&field_data->is_focusable) || |
| + !iter->ReadBool(&field_data->should_autocomplete) || |
| !ReadAsInt(iter, &field_data->role) || |
| !ReadAsInt(iter, &field_data->text_direction) || |
| !ReadStringVector(iter, &field_data->option_values) || |