summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/autofill')
-rw-r--r--chrome/browser/autofill/address_field.cc4
-rw-r--r--chrome/browser/autofill/address_field.h2
-rw-r--r--chrome/browser/autofill/home_phone_number.cc29
-rw-r--r--chrome/browser/autofill/home_phone_number.h26
4 files changed, 40 insertions, 21 deletions
diff --git a/chrome/browser/autofill/address_field.cc b/chrome/browser/autofill/address_field.cc
index 41a1a1d..ea7dea7 100644
--- a/chrome/browser/autofill/address_field.cc
+++ b/chrome/browser/autofill/address_field.cc
@@ -70,6 +70,10 @@ bool AddressField::GetFieldInfo(FieldTypeMap* field_type_map) const {
return ok;
}
+FormFieldType AddressField::GetFormFieldType() const {
+ return kAddressType;
+}
+
AddressField* AddressField::Parse(
std::vector<AutoFillField*>::const_iterator* iter,
bool is_ecml) {
diff --git a/chrome/browser/autofill/address_field.h b/chrome/browser/autofill/address_field.h
index 51dd105..116ae35 100644
--- a/chrome/browser/autofill/address_field.h
+++ b/chrome/browser/autofill/address_field.h
@@ -16,7 +16,7 @@ class AutoFillField;
class AddressField : public FormField {
public:
virtual bool GetFieldInfo(FieldTypeMap* field_type_map) const;
- virtual FormFieldType GetFormFieldType() const { return kAddressType; }
+ virtual FormFieldType GetFormFieldType() const;
static AddressField* Parse(std::vector<AutoFillField*>::const_iterator* iter,
bool is_ecml);
diff --git a/chrome/browser/autofill/home_phone_number.cc b/chrome/browser/autofill/home_phone_number.cc
new file mode 100644
index 0000000..f48efa8
--- /dev/null
+++ b/chrome/browser/autofill/home_phone_number.cc
@@ -0,0 +1,29 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/autofill/home_phone_number.h"
+
+FormGroup* HomePhoneNumber::Clone() const {
+ return new HomePhoneNumber(*this);
+}
+
+AutoFillFieldType HomePhoneNumber::GetNumberType() const {
+ return PHONE_HOME_NUMBER;
+}
+
+AutoFillFieldType HomePhoneNumber::GetCityCodeType() const {
+ return PHONE_HOME_CITY_CODE;
+}
+
+AutoFillFieldType HomePhoneNumber::GetCountryCodeType() const {
+ return PHONE_HOME_COUNTRY_CODE;
+}
+
+AutoFillFieldType HomePhoneNumber::GetCityAndNumberType() const {
+ return PHONE_HOME_CITY_AND_NUMBER;
+}
+
+AutoFillFieldType HomePhoneNumber::GetWholeNumberType() const {
+ return PHONE_HOME_WHOLE_NUMBER;
+}
diff --git a/chrome/browser/autofill/home_phone_number.h b/chrome/browser/autofill/home_phone_number.h
index e2aba0a..3e311e6 100644
--- a/chrome/browser/autofill/home_phone_number.h
+++ b/chrome/browser/autofill/home_phone_number.h
@@ -13,28 +13,14 @@ class FormGroup;
class HomePhoneNumber : public PhoneNumber {
public:
HomePhoneNumber() {}
- virtual FormGroup* Clone() const { return new HomePhoneNumber(*this); }
+ virtual FormGroup* Clone() const;
protected:
- virtual AutoFillFieldType GetNumberType() const {
- return PHONE_HOME_NUMBER;
- }
-
- virtual AutoFillFieldType GetCityCodeType() const {
- return PHONE_HOME_CITY_CODE;
- }
-
- virtual AutoFillFieldType GetCountryCodeType() const {
- return PHONE_HOME_COUNTRY_CODE;
- }
-
- virtual AutoFillFieldType GetCityAndNumberType() const {
- return PHONE_HOME_CITY_AND_NUMBER;
- }
-
- virtual AutoFillFieldType GetWholeNumberType() const {
- return PHONE_HOME_WHOLE_NUMBER;
- }
+ virtual AutoFillFieldType GetNumberType() const;
+ virtual AutoFillFieldType GetCityCodeType() const;
+ virtual AutoFillFieldType GetCountryCodeType() const;
+ virtual AutoFillFieldType GetCityAndNumberType() const;
+ virtual AutoFillFieldType GetWholeNumberType() const;
private:
explicit HomePhoneNumber(const HomePhoneNumber& phone) : PhoneNumber(phone) {}