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

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

Issue 980583002: Serialize form_data in Gnome keyring password store service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Style fix Created 5 years, 9 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_data.h
diff --git a/components/autofill/core/common/form_data.h b/components/autofill/core/common/form_data.h
index 747fca96bfc1b3bef58a2c0d977b7c296db4cb3f..9b2838f48c684c04085e54722a45fdefe08c3124 100644
--- a/components/autofill/core/common/form_data.h
+++ b/components/autofill/core/common/form_data.h
@@ -44,12 +44,21 @@ struct FormData {
std::ostream& operator<<(std::ostream& os, const FormData& form);
// Serialize FormData. Used by the PasswordManager to persist FormData
-// pertaining to password forms. Serialized data is appended to |pickle|
+// pertaining to password forms. Serialized data is appended to |pickle|.
void SerializeFormData(const FormData& form_data, Pickle* pickle);
// Deserialize FormData. This assumes that |iter| is currently pointing to
// the part of a pickle created by SerializeFormData. Returns true on success.
bool DeserializeFormData(PickleIterator* iter, FormData* form_data);
+// Serialize FormData. Used by the PasswordManager to persist FormData
+// pertaining to password forms in base64 string. It is useful since in some
+// cases we need to store C strings without embedded '\0' symbols.
+void SerializeFormDataToBase64String(const FormData& form_data,
+ std::string* output);
+// Deserialize FormData. Returns true on success.
+bool DeserializeFormDataFromBase64String(const base::StringPiece& input,
+ FormData* form_data);
+
} // namespace autofill
#endif // COMPONENTS_AUTOFILL_CORE_COMMON_FORM_DATA_H_
« no previous file with comments | « chrome/browser/password_manager/native_backend_libsecret_unittest.cc ('k') | components/autofill/core/common/form_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698