| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "chrome/browser/autofill/address.h" | 9 #include "chrome/browser/autofill/address.h" |
| 10 #include "chrome/browser/autofill/field_types.h" | 10 #include "chrome/browser/autofill/field_types.h" |
| 11 | 11 |
| 12 class FormGroup; | 12 class FormGroup; |
| 13 | 13 |
| 14 // A specialization of Address that identifies itself as a home address. | 14 // A specialization of Address that identifies itself as a home address. |
| 15 class HomeAddress : public Address { | 15 class HomeAddress : public Address { |
| 16 public: | 16 public: |
| 17 HomeAddress() {} | 17 HomeAddress() {} |
| 18 FormGroup* Clone() const { return new HomeAddress(*this); } | 18 virtual FormGroup* Clone() const { return new HomeAddress(*this); } |
| 19 | 19 |
| 20 protected: | 20 protected: |
| 21 virtual AutoFillFieldType GetLine1Type() const { | 21 virtual AutoFillFieldType GetLine1Type() const { |
| 22 return ADDRESS_HOME_LINE1; | 22 return ADDRESS_HOME_LINE1; |
| 23 } | 23 } |
| 24 | 24 |
| 25 virtual AutoFillFieldType GetLine2Type() const { | 25 virtual AutoFillFieldType GetLine2Type() const { |
| 26 return ADDRESS_HOME_LINE2; | 26 return ADDRESS_HOME_LINE2; |
| 27 } | 27 } |
| 28 | 28 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 45 virtual AutoFillFieldType GetCountryType() const { | 45 virtual AutoFillFieldType GetCountryType() const { |
| 46 return ADDRESS_HOME_COUNTRY; | 46 return ADDRESS_HOME_COUNTRY; |
| 47 } | 47 } |
| 48 | 48 |
| 49 private: | 49 private: |
| 50 explicit HomeAddress(const HomeAddress& address) : Address(address) {} | 50 explicit HomeAddress(const HomeAddress& address) : Address(address) {} |
| 51 void operator=(const HomeAddress& address); // Not implemented. | 51 void operator=(const HomeAddress& address); // Not implemented. |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 #endif // CHROME_BROWSER_AUTOFILL_HOME_ADDRESS_H_ | 54 #endif // CHROME_BROWSER_AUTOFILL_HOME_ADDRESS_H_ |
| OLD | NEW |