Index: chrome/browser/autofill/form_structure.h |
diff --git a/chrome/browser/autofill/form_structure.h b/chrome/browser/autofill/form_structure.h |
index 72485af67cde2e0f9eeafa9d54975952f945c312..b4f3194d20189e3522d28ab1c1ebadb209ce6b7a 100644 |
--- a/chrome/browser/autofill/form_structure.h |
+++ b/chrome/browser/autofill/form_structure.h |
@@ -45,7 +45,7 @@ class XmlElement; |
// in the fields along with additional information needed by Autofill. |
class FormStructure { |
public: |
- explicit FormStructure(const FormData& form); |
+ FormStructure(const FormData& form, bool autocheckout_enabled); |
Ilya Sherman
2013/01/28 23:21:39
nit: Rather than passing in a boolean, which is ha
benquan
2013/01/29 03:28:30
It will not be consistent with other methods in th
Ilya Sherman
2013/01/29 05:56:35
That's ok. It's worthwhile to move code in that d
benquan
2013/01/30 00:48:42
Is it a new coding style guide requires to replace
Ilya Sherman
2013/01/30 00:52:48
Specifically, booleans as parameters to functions,
benquan
2013/01/30 18:39:00
Bascially we have the same issue with all constant
Ilya Sherman
2013/01/30 21:05:31
I do insist that if you keep this as a parameter t
benquan
2013/01/31 03:21:23
Replaced autochout_enabled with autocheckout_url_p
|
virtual ~FormStructure(); |
// Runs several heuristics against the form fields to determine their possible |
@@ -172,6 +172,7 @@ class FormStructure { |
private: |
friend class FormStructureTest; |
FRIEND_TEST_ALL_PREFIXES(AutofillDownloadTest, QueryAndUploadTest); |
+ |
// 64-bit hash of the string - used in FormSignature and unit-tests. |
static std::string Hash64Bit(const std::string& str); |
@@ -194,6 +195,9 @@ class FormStructure { |
// distinguishing credit card sections from non-credit card ones -- is made. |
void IdentifySections(bool has_author_specified_sections); |
+ // Returns the minimal number of fillable fields required to start autofill. |
+ size_t RequiredFillableFields() const; |
+ |
// The name of the form. |
string16 form_name_; |
@@ -243,8 +247,9 @@ class FormStructure { |
// author, via the |autocompletetype| attribute. |
bool has_author_specified_types_; |
- // State of the kEnableExperimentalFormFilling flag. |
- bool experimental_form_filling_enabled_; |
+ // Whether the autocheckout feature is enabled for the site which contains |
+ // this form. |
+ bool autocheckout_enabled_; |
DISALLOW_COPY_AND_ASSIGN(FormStructure); |
}; |