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

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: Pass autocheckout url prefix to FormStructure's constructor. Created 7 years, 11 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
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..061a0dbf5d5b8d6842e14741ec409ac2983e2568 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, std::string autocheckout_url_prefix);
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,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_;
@@ -243,8 +249,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);
};

Powered by Google App Engine
This is Rietveld 408576698