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

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

Issue 22009003: [Autofill] Distinguish between native field types and potentially HTML field types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 4 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/autofill_field.h
diff --git a/components/autofill/core/browser/autofill_field.h b/components/autofill/core/browser/autofill_field.h
index e4e8217bbe9fac6cb368c0c108fe9ce6a2d44b72..53826cd2ec0ff8856b0a5e1b9a297085ede68b1f 100644
--- a/components/autofill/core/browser/autofill_field.h
+++ b/components/autofill/core/browser/autofill_field.h
@@ -14,6 +14,8 @@
namespace autofill {
+class AutofillType;
+
class AutofillField : public FormFieldData {
public:
enum PhonePart {
@@ -29,23 +31,23 @@ class AutofillField : public FormFieldData {
const base::string16& unique_name() const { return unique_name_; }
const std::string& section() const { return section_; }
- AutofillFieldType heuristic_type() const { return heuristic_type_; }
- AutofillFieldType server_type() const { return server_type_; }
- const FieldTypeSet& possible_types() const { return possible_types_; }
+ ServerFieldType heuristic_type() const { return heuristic_type_; }
+ ServerFieldType server_type() const { return server_type_; }
+ const ServerFieldTypeSet& possible_types() const { return possible_types_; }
PhonePart phone_part() const { return phone_part_; }
// Sets the heuristic type of this field, validating the input.
void set_section(const std::string& section) { section_ = section; }
- void set_heuristic_type(AutofillFieldType type);
- void set_server_type(AutofillFieldType type);
- void set_possible_types(const FieldTypeSet& possible_types) {
+ void set_heuristic_type(ServerFieldType type);
+ void set_server_type(ServerFieldType type);
+ void set_possible_types(const ServerFieldTypeSet& possible_types) {
possible_types_ = possible_types;
}
void set_phone_part(PhonePart part) { phone_part_ = part; }
// This function automatically chooses between server and heuristic autofill
// type, depending on the data available.
- AutofillFieldType type() const;
+ AutofillType Type() const;
// Returns true if the value of this field is empty.
bool IsEmpty() const;
@@ -70,13 +72,13 @@ class AutofillField : public FormFieldData {
std::string section_;
// The type of the field, as determined by the Autofill server.
- AutofillFieldType server_type_;
+ ServerFieldType server_type_;
// The type of the field, as determined by the local heuristics.
- AutofillFieldType heuristic_type_;
+ ServerFieldType heuristic_type_;
// The set of possible types for this field.
- FieldTypeSet possible_types_;
+ ServerFieldTypeSet possible_types_;
// Used to track whether this field is a phone prefix or suffix.
PhonePart phone_part_;
« no previous file with comments | « components/autofill/core/browser/autofill_download_unittest.cc ('k') | components/autofill/core/browser/autofill_field.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698