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

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

Issue 23033010: [password autofill] Add serialization for FormData and FormFieldData (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Windows Created 7 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: components/autofill/core/common/form_field_data.h
diff --git a/components/autofill/core/common/form_field_data.h b/components/autofill/core/common/form_field_data.h
index f0e7579cd0a08fb992fb4e5b492ee0da061a5779..1bf163e95f28447d09ae4195b0087e745f8183ab 100644
--- a/components/autofill/core/common/form_field_data.h
+++ b/components/autofill/core/common/form_field_data.h
@@ -10,6 +10,9 @@
#include "base/i18n/rtl.h"
#include "base/strings/string16.h"
+class Pickle;
+class PickleIterator;
+
namespace autofill {
// Stores information about a field in a form.
@@ -45,6 +48,13 @@ struct FormFieldData {
std::vector<base::string16> option_contents;
};
+// Serialize and deserialize FormFieldData. These are used when FormData objects
+// are serialized and deserialized.
+void SerializeFormFieldData(const FormFieldData& form_field_data,
+ Pickle* serialized);
+bool DeserializeFormFieldData(PickleIterator* pickle_iterator,
+ FormFieldData* form_field_data);
+
// So we can compare FormFieldDatas with EXPECT_EQ().
std::ostream& operator<<(std::ostream& os, const FormFieldData& field);
@@ -66,4 +76,3 @@ std::ostream& operator<<(std::ostream& os, const FormFieldData& field);
} // namespace autofill
#endif // COMPONENTS_AUTOFILL_CORE_COMMON_FORM_FIELD_DATA_H_
-
« no previous file with comments | « components/autofill/core/common/form_data_unittest.cc ('k') | components/autofill/core/common/form_field_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698