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

Unified Diff: chrome/browser/autofill/form_structure.h

Issue 11867025: Download autocheckout whitelist and enable autocheckout for whitelisted sites only. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to head Created 7 years, 10 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 | « chrome/browser/autofill/autofill_metrics_unittest.cc ('k') | chrome/browser/autofill/form_structure.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/form_structure.h
diff --git a/chrome/browser/autofill/form_structure.h b/chrome/browser/autofill/form_structure.h
index 8b162828a9230873022109367b5879e0d199b7b2..e8cdc1f9f7e8b102761a514d69a6ae3512e63bc5 100644
--- a/chrome/browser/autofill/form_structure.h
+++ b/chrome/browser/autofill/form_structure.h
@@ -49,7 +49,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, std::string autocheckout_url_prefix);
virtual ~FormStructure();
// Runs several heuristics against the form fields to determine their possible
@@ -164,6 +164,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);
@@ -186,6 +187,11 @@ class FormStructure {
// distinguishing credit card sections from non-credit card ones -- is made.
void IdentifySections(bool has_author_specified_sections);
+ bool IsAutocheckoutEnabled() const;
+
+ // Returns the minimal number of fillable fields required to start autofill.
+ size_t RequiredFillableFields() const;
+
// The name of the form.
string16 form_name_;
@@ -224,8 +230,9 @@ class FormStructure {
// author, via the |autocompletetype| attribute.
bool has_author_specified_types_;
- // State of the kEnableExperimentalFormFilling flag.
- bool experimental_form_filling_enabled_;
+ // The URL prefix matched in autocheckout whitelist. An empty string implies
+ // autocheckout is not enabled for this form.
+ std::string autocheckout_url_prefix_;
DISALLOW_COPY_AND_ASSIGN(FormStructure);
};
« no previous file with comments | « chrome/browser/autofill/autofill_metrics_unittest.cc ('k') | chrome/browser/autofill/form_structure.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698