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

Unified Diff: components/autofill/core/browser/autofill_type.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_type.h
diff --git a/components/autofill/core/browser/autofill_type.h b/components/autofill/core/browser/autofill_type.h
index c85bea1589c9a3ca26b7db2cd895095af8950990..a7d243c4f3f3ebd6075cabe745d14b6745a4c0ed 100644
--- a/components/autofill/core/browser/autofill_type.h
+++ b/components/autofill/core/browser/autofill_type.h
@@ -15,29 +15,32 @@ namespace autofill {
// and for associating form fields with form values in the Web Database.
class AutofillType {
public:
- explicit AutofillType(AutofillFieldType field_type);
+ explicit AutofillType(ServerFieldType field_type);
AutofillType(const AutofillType& autofill_type);
AutofillType& operator=(const AutofillType& autofill_type);
- AutofillFieldType field_type() const;
+ // TODO(isherman): Audit all uses of this method.
+ ServerFieldType server_type() const { return server_type_; }
FieldTypeGroup group() const;
// Maps |field_type| to a field type that can be directly stored in a profile
// (in the sense that it makes sense to call |AutofillProfile::SetInfo()| with
// the returned field type as the first parameter).
- static AutofillFieldType GetEquivalentFieldType(AutofillFieldType field_type);
+ static ServerFieldType GetEquivalentFieldType(ServerFieldType field_type);
// Maps |field_type| to a field type from ADDRESS_BILLING FieldTypeGroup if
// field type is an Address type.
- static AutofillFieldType GetEquivalentBillingFieldType(
- AutofillFieldType field_type);
+ static ServerFieldType GetEquivalentBillingFieldType(
+ ServerFieldType field_type);
- // Utilities for serializing and deserializing an |AutofillFieldType|.
- static std::string FieldTypeToString(AutofillFieldType field_type);
- static AutofillFieldType StringToFieldType(const std::string& str);
+ // Utilities for serializing and deserializing a |ServerFieldType|.
+ // TODO(isherman): This should probably serialize an HTML type as well.
+ // Audit all uses of these functions.
+ static std::string FieldTypeToString(ServerFieldType field_type);
+ static ServerFieldType StringToFieldType(const std::string& str);
private:
- AutofillFieldType field_type_;
+ ServerFieldType server_type_;
};
} // namespace autofill
« no previous file with comments | « components/autofill/core/browser/autofill_server_field_info.h ('k') | components/autofill/core/browser/autofill_type.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698