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

Unified Diff: components/autofill/core/browser/form_structure.h

Issue 178263004: rAc - Only show countries we're able to fill in. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android build Created 6 years, 9 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: components/autofill/core/browser/form_structure.h
diff --git a/components/autofill/core/browser/form_structure.h b/components/autofill/core/browser/form_structure.h
index 46fff02f30e6fe76964211570f50a2b7988a2037..a15080f7fdb8f2c87909c13d83ec0e082b11f00c 100644
--- a/components/autofill/core/browser/form_structure.h
+++ b/components/autofill/core/browser/form_structure.h
@@ -5,6 +5,7 @@
#ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_FORM_STRUCTURE_H_
#define COMPONENTS_AUTOFILL_CORE_BROWSER_FORM_STRUCTURE_H_
+#include <set>
#include <string>
#include <vector>
@@ -151,6 +152,15 @@ class FormStructure {
const base::Callback<base::string16(const AutofillType&)>& get_info,
const std::string& app_locale);
+ // Returns the values that can be filled into the form structure for the
+ // given type. For example, there's no way to fill in a value of "The Moon"
+ // into ADDRESS_HOME_STATE if the form only has a
+ // <select autocomplete="region"> with no "The Moon" option. Returns an
+ // empty set if the form doesn't reference the given type or if all inputs
+ // are accepted (e.g., <input type="text" autocomplete="region">).
+ // All returned values are standardized to upper case.
+ std::set<base::string16> PossibleValues(ServerFieldType type);
+
const AutofillField* field(size_t index) const;
AutofillField* field(size_t index);
size_t field_count() const;
« no previous file with comments | « chrome/browser/ui/webui/options/autofill_options_handler.cc ('k') | components/autofill/core/browser/form_structure.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698