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

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

Issue 242613006: [Autofill] Enable Autofill for dynamically created forms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Test fix Created 6 years, 8 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/forms_seen_state.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 534a231483d84e52c051cb9d3936e37a35c1a034..3adc4c33927cf1bef0176f1d96862b12d918d23c 100644
--- a/components/autofill/core/common/form_data.cc
+++ b/components/autofill/core/common/form_data.cc
@@ -79,6 +79,20 @@ bool FormData::operator!=(const FormData& form) const {
return !operator==(form);
}
+bool FormData::operator<(const FormData& form) const {
+ if (name != form.name)
+ return name < form.name;
+ if (StringToLowerASCII(method) != StringToLowerASCII(form.method))
+ return StringToLowerASCII(method) < StringToLowerASCII(form.method);
+ if (origin != form.origin)
+ return origin < form.origin;
+ if (action != form.action)
+ return action < form.action;
+ if (user_submitted != form.user_submitted)
+ return user_submitted < form.user_submitted;
+ return fields < form.fields;
+}
+
std::ostream& operator<<(std::ostream& os, const FormData& form) {
os << base::UTF16ToUTF8(form.name) << " "
<< base::UTF16ToUTF8(form.method) << " "
« no previous file with comments | « components/autofill/core/common/form_data.h ('k') | components/autofill/core/common/forms_seen_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698