| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 COMPONENTS_AUTOFILL_CONTENT_BROWSER_WALLET_WALLET_ADDRESS_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_BROWSER_WALLET_WALLET_ADDRESS_H_ |
| 6 #define COMPONENTS_AUTOFILL_CONTENT_BROWSER_WALLET_WALLET_ADDRESS_H_ | 6 #define COMPONENTS_AUTOFILL_CONTENT_BROWSER_WALLET_WALLET_ADDRESS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
| 13 #include "components/autofill/core/browser/field_types.h" | |
| 14 | 13 |
| 15 namespace base { | 14 namespace base { |
| 16 class DictionaryValue; | 15 class DictionaryValue; |
| 17 } | 16 } |
| 18 | 17 |
| 19 namespace autofill { | 18 namespace autofill { |
| 20 | 19 |
| 21 class AutofillProfile; | 20 class AutofillProfile; |
| 21 class AutofillType; |
| 22 | 22 |
| 23 namespace wallet { | 23 namespace wallet { |
| 24 | 24 |
| 25 // TODO(ahutter): This address is a lot like | 25 // TODO(ahutter): This address is a lot like |
| 26 // components/autofill/core/browser/address.h. There should be a super | 26 // components/autofill/core/browser/address.h. There should be a super |
| 27 // class that both extend from to clean up duplicated code. See | 27 // class that both extend from to clean up duplicated code. See |
| 28 // http://crbug.com/164463. | 28 // http://crbug.com/164463. |
| 29 | 29 |
| 30 // Address contains various address fields that have been populated from the | 30 // Address contains various address fields that have been populated from the |
| 31 // user's Online Wallet. It is loosely modeled as a subet of the OASIS | 31 // user's Online Wallet. It is loosely modeled as a subet of the OASIS |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 | 84 |
| 85 // Returns a string that summarizes this address, suitable for display to | 85 // Returns a string that summarizes this address, suitable for display to |
| 86 // the user. | 86 // the user. |
| 87 base::string16 DisplayName() const; | 87 base::string16 DisplayName() const; |
| 88 | 88 |
| 89 // Returns a string that could be used as a sub-label, suitable for display | 89 // Returns a string that could be used as a sub-label, suitable for display |
| 90 // to the user together with DisplayName(). | 90 // to the user together with DisplayName(). |
| 91 base::string16 DisplayNameDetail() const; | 91 base::string16 DisplayNameDetail() const; |
| 92 | 92 |
| 93 // Returns data appropriate for |type|. | 93 // Returns data appropriate for |type|. |
| 94 base::string16 GetInfo(AutofillFieldType type, | 94 base::string16 GetInfo(const AutofillType& type, |
| 95 const std::string& app_locale) const; | 95 const std::string& app_locale) const; |
| 96 | 96 |
| 97 const std::string& country_name_code() const { return country_name_code_; } | 97 const std::string& country_name_code() const { return country_name_code_; } |
| 98 const base::string16& recipient_name() const { return recipient_name_; } | 98 const base::string16& recipient_name() const { return recipient_name_; } |
| 99 const base::string16& address_line_1() const { return address_line_1_; } | 99 const base::string16& address_line_1() const { return address_line_1_; } |
| 100 const base::string16& address_line_2() const { return address_line_2_; } | 100 const base::string16& address_line_2() const { return address_line_2_; } |
| 101 const base::string16& locality_name() const { return locality_name_; } | 101 const base::string16& locality_name() const { return locality_name_; } |
| 102 const base::string16& administrative_area_name() const { | 102 const base::string16& administrative_area_name() const { |
| 103 return administrative_area_name_; | 103 return administrative_area_name_; |
| 104 } | 104 } |
| 105 const base::string16& postal_code_number() const { | 105 const base::string16& postal_code_number() const { |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 bool is_complete_address_; | 192 bool is_complete_address_; |
| 193 | 193 |
| 194 // This class is intentionally copyable. | 194 // This class is intentionally copyable. |
| 195 DISALLOW_ASSIGN(Address); | 195 DISALLOW_ASSIGN(Address); |
| 196 }; | 196 }; |
| 197 | 197 |
| 198 } // namespace wallet | 198 } // namespace wallet |
| 199 } // namespace autofill | 199 } // namespace autofill |
| 200 | 200 |
| 201 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_WALLET_WALLET_ADDRESS_H_ | 201 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_WALLET_WALLET_ADDRESS_H_ |
| OLD | NEW |