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

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

Issue 23857010: Revert "Revert 223907 "[password generation] Upload possible account cre..."" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 | « components/autofill/core/common/form_data.h ('k') | components/autofill/core/common/password_form.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 078a58d146aa4e541d4003ca87929748ff8308b4..050e2e5758250f83e3d43a4f9a55b33d39192e89 100644
--- a/components/autofill/core/common/form_data.cc
+++ b/components/autofill/core/common/form_data.cc
@@ -6,6 +6,7 @@
#include "base/pickle.h"
#include "base/strings/string_util.h"
+#include "base/strings/utf_string_conversions.h"
#include "components/autofill/core/common/form_field_data.h"
namespace autofill {
@@ -78,6 +79,19 @@ bool FormData::operator!=(const FormData& form) const {
return !operator==(form);
}
+std::ostream& operator<<(std::ostream& os, const FormData& form) {
+ os << UTF16ToUTF8(form.name) << " "
+ << UTF16ToUTF8(form.method) << " "
+ << form.origin << " "
+ << form.action << " "
+ << form.user_submitted << " "
+ << "Fields:";
+ for (size_t i = 0; i < form.fields.size(); ++i) {
+ os << form.fields[i] << ",";
+ }
+ return os;
+}
+
void SerializeFormData(const FormData& form_data, Pickle* pickle) {
pickle->WriteInt(kPickleVersion);
pickle->WriteString16(form_data.name);
« no previous file with comments | « components/autofill/core/common/form_data.h ('k') | components/autofill/core/common/password_form.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698