Index: chrome/browser/autofill/form_field.h |
diff --git a/chrome/browser/autofill/form_field.h b/chrome/browser/autofill/form_field.h |
index 3bb5c0eca47528862efea72e7ff0e44fb250544f..3fcb04e3d8a25cba3a9172c9dd095f73d9a5600e 100644 |
--- a/chrome/browser/autofill/form_field.h |
+++ b/chrome/browser/autofill/form_field.h |
@@ -79,18 +79,32 @@ class FormField { |
const string16& pattern, |
bool match_label_only); |
+ struct Pattern { |
+ string16 pattern; |
+ bool select_one_is_ok; |
+ |
+ Pattern(const string16& pattern) |
honten.org
2011/05/12 05:36:33
I know we need to add explicit.
But before adding
Ilya Sherman
2011/05/13 00:54:53
Let's instead create an enum along the lines of
e
honten.org
2011/05/13 01:39:48
After this change, we might need to implement more
dhollowa
2011/05/14 02:15:50
I think this may be a good opportunity to use a bi
|
+ : pattern(pattern), |
+ select_one_is_ok(false) { |
+ } |
+ Pattern(const string16& pattern, bool select_one_is_ok) |
+ : pattern(pattern), |
+ select_one_is_ok(select_one_is_ok) { |
+ } |
+ }; |
+ |
// Parses a field using the different field views we know about. |is_ecml| |
// should be true when the field conforms to the ECML specification. |
static FormField* ParseFormField(AutofillScanner* scanner, bool is_ecml); |
// Attempts to parse a text field with the given pattern; returns true on |
// success, but doesn't return the actual text field itself. |
- static bool ParseText(AutofillScanner* scanner, const string16& pattern); |
+ static bool ParseText(AutofillScanner* scanner, const Pattern& pattern); |
// Attempts to parse a text field with the given pattern. Returns true on |
// success and fills |dest| with a pointer to the field. |
static bool ParseText(AutofillScanner* scanner, |
- const string16& pattern, |
+ const Pattern& pattern, |
const AutofillField** dest); |
// Attempts to parse a text field with an empty name or label. Returns true |
@@ -101,7 +115,7 @@ class FormField { |
// Attempts to parse a text field label with the given pattern. Returns true |
// on success and fills |dest| with a pointer to the field. |
static bool ParseLabelText(AutofillScanner* scanner, |
- const string16& pattern, |
+ const Pattern& pattern, |
const AutofillField** dest); |
// Attempts to parse a control with an empty label. |
@@ -130,7 +144,7 @@ class FormField { |
private: |
static bool ParseText(AutofillScanner* scanner, |
- const string16& pattern, |
+ const Pattern& pattern, |
const AutofillField** dest, |
bool match_label_only); |