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

Unified Diff: components/autofill/core/common/form_field_data.cc

Issue 800543009: autofill: bumped pickle version of FormFieldData (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « no previous file | components/autofill/core/common/form_field_data_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) ||
« no previous file with comments | « no previous file | components/autofill/core/common/form_field_data_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698