| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_AUTOFILL_HOME_ADDRESS_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_HOME_ADDRESS_H_ |
| 6 #define CHROME_BROWSER_AUTOFILL_HOME_ADDRESS_H_ | 6 #define CHROME_BROWSER_AUTOFILL_HOME_ADDRESS_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/autofill/address.h" | 8 #include "chrome/browser/autofill/address.h" |
| 9 #include "chrome/browser/autofill/field_types.h" | 9 #include "chrome/browser/autofill/field_types.h" |
| 10 | 10 |
| 11 class FormGroup; | 11 class FormGroup; |
| 12 | 12 |
| 13 // A specialization of Address that identifies itself as a home address. | 13 // A specialization of Address that identifies itself as a home address. |
| 14 class HomeAddress : public Address { | 14 class HomeAddress : public Address { |
| 15 public: | 15 public: |
| 16 HomeAddress() {} | 16 HomeAddress() {} |
| 17 FormGroup* Clone() const { return new HomeAddress(*this); } | 17 FormGroup* Clone() const { return new HomeAddress(*this); } |
| 18 | 18 |
| 19 protected: | 19 protected: |
| 20 virtual AutoFillFieldType GetLine1Type() const { | 20 virtual AutoFillFieldType GetLine1Type() const { |
| 21 return ADDRESS_HOME_LINE1; | 21 return ADDRESS_HOME_LINE1; |
| 22 } | 22 } |
| 23 | 23 |
| 24 virtual AutoFillFieldType GetLine2Type() const { | 24 virtual AutoFillFieldType GetLine2Type() const { |
| 25 return ADDRESS_HOME_LINE2; | 25 return ADDRESS_HOME_LINE2; |
| 26 } | 26 } |
| 27 | 27 |
| 28 virtual AutoFillFieldType GetApptNumType() const { | 28 virtual AutoFillFieldType GetAptNumType() const { |
| 29 return ADDRESS_HOME_APPT_NUM; | 29 return ADDRESS_HOME_APT_NUM; |
| 30 } | 30 } |
| 31 | 31 |
| 32 virtual AutoFillFieldType GetCityType() const { | 32 virtual AutoFillFieldType GetCityType() const { |
| 33 return ADDRESS_HOME_CITY; | 33 return ADDRESS_HOME_CITY; |
| 34 } | 34 } |
| 35 | 35 |
| 36 virtual AutoFillFieldType GetStateType() const { | 36 virtual AutoFillFieldType GetStateType() const { |
| 37 return ADDRESS_HOME_STATE; | 37 return ADDRESS_HOME_STATE; |
| 38 } | 38 } |
| 39 | 39 |
| 40 virtual AutoFillFieldType GetZipCodeType() const { | 40 virtual AutoFillFieldType GetZipCodeType() const { |
| 41 return ADDRESS_HOME_ZIP; | 41 return ADDRESS_HOME_ZIP; |
| 42 } | 42 } |
| 43 | 43 |
| 44 virtual AutoFillFieldType GetCountryType() const { | 44 virtual AutoFillFieldType GetCountryType() const { |
| 45 return ADDRESS_HOME_COUNTRY; | 45 return ADDRESS_HOME_COUNTRY; |
| 46 } | 46 } |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 explicit HomeAddress(const HomeAddress& address) : Address(address) {} | 49 explicit HomeAddress(const HomeAddress& address) : Address(address) {} |
| 50 void operator=(const HomeAddress& address); // Not implemented. | 50 void operator=(const HomeAddress& address); // Not implemented. |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 #endif // CHROME_BROWSER_AUTOFILL_HOME_ADDRESS_H_ | 53 #endif // CHROME_BROWSER_AUTOFILL_HOME_ADDRESS_H_ |
| OLD | NEW |