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

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

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.cc ('k') | components/autofill/core/common/password_form.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/core/common/password_form.h
diff --git a/components/autofill/core/common/password_form.h b/components/autofill/core/common/password_form.h
index 9ecb2145630d0858e39d3dea4dca06262588b749..8485225a35fc412d65b431b2771291574dbe3b05 100644
--- a/components/autofill/core/common/password_form.h
+++ b/components/autofill/core/common/password_form.h
@@ -10,6 +10,7 @@
#include <vector>
#include "base/time/time.h"
+#include "components/autofill/core/common/form_data.h"
#include "url/gurl.h"
namespace autofill {
@@ -180,9 +181,20 @@ struct PasswordForm {
// When parsing an HTML form, this is not used.
int times_used;
+ // Autofill representation of this form. Used to communicate with the
+ // Autofill servers if necessary. Currently this is only used to help
+ // determine forms where we can trigger password generation.
+ //
+ // When parsing an HTML form, this is normally set.
+ FormData form_data;
+
// Returns true if this match was found using public suffix matching.
bool IsPublicSuffixMatch() const;
+ // Equality operators for testing.
+ bool operator==(const PasswordForm& form) const;
+ bool operator!=(const PasswordForm& form) const;
+
PasswordForm();
~PasswordForm();
};
@@ -190,6 +202,10 @@ struct PasswordForm {
// Map username to PasswordForm* for convenience. See password_form_manager.h.
typedef std::map<string16, PasswordForm*> PasswordFormMap;
+// For testing.
+std::ostream& operator<<(std::ostream& os,
+ const autofill::PasswordForm& form);
+
} // namespace autofill
#endif // COMPONENTS_AUTOFILL_CORE_COMMON_PASSWORD_FORM_H__
« no previous file with comments | « components/autofill/core/common/form_data.cc ('k') | components/autofill/core/common/password_form.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698