| Index: components/autofill/content/browser/wallet/wallet_address.h
|
| diff --git a/components/autofill/content/browser/wallet/wallet_address.h b/components/autofill/content/browser/wallet/wallet_address.h
|
| index ae83c6f458b803e9e4b17c3da84fe7dfab71796f..a88a904e2825d6f94f9282e7267c4a0c236a7008 100644
|
| --- a/components/autofill/content/browser/wallet/wallet_address.h
|
| +++ b/components/autofill/content/browser/wallet/wallet_address.h
|
| @@ -45,11 +45,12 @@ class Address {
|
|
|
| Address(const std::string& country_name_code,
|
| const base::string16& recipient_name,
|
| - const base::string16& address_line_1,
|
| - const base::string16& address_line_2,
|
| + const std::vector<base::string16>& street_address,
|
| const base::string16& locality_name,
|
| + const base::string16& dependent_locality_name,
|
| const base::string16& administrative_area_name,
|
| const base::string16& postal_code_number,
|
| + const base::string16& sorting_code,
|
| const base::string16& phone_number,
|
| const std::string& object_id);
|
|
|
| @@ -101,8 +102,9 @@ class Address {
|
|
|
| const std::string& country_name_code() const { return country_name_code_; }
|
| const base::string16& recipient_name() const { return recipient_name_; }
|
| - const base::string16& address_line_1() const { return address_line_1_; }
|
| - const base::string16& address_line_2() const { return address_line_2_; }
|
| + const std::vector<base::string16>& street_address() const {
|
| + return street_address_;
|
| + }
|
| const base::string16& locality_name() const { return locality_name_; }
|
| const base::string16& administrative_area_name() const {
|
| return administrative_area_name_;
|
| @@ -122,15 +124,16 @@ class Address {
|
| void set_recipient_name(const base::string16& recipient_name) {
|
| recipient_name_ = recipient_name;
|
| }
|
| - void set_address_line_1(const base::string16& address_line_1) {
|
| - address_line_1_ = address_line_1;
|
| - }
|
| - void set_address_line_2(const base::string16& address_line_2) {
|
| - address_line_2_ = address_line_2;
|
| + void set_street_address(const std::vector<base::string16>& street_address) {
|
| + street_address_ = street_address;
|
| }
|
| void set_locality_name(const base::string16& locality_name) {
|
| locality_name_ = locality_name;
|
| }
|
| + void set_dependent_locality_name(
|
| + const base::string16& dependent_locality_name) {
|
| + dependent_locality_name_ = dependent_locality_name;
|
| + }
|
| void set_administrative_area_name(
|
| const base::string16& administrative_area_name) {
|
| administrative_area_name_ = administrative_area_name;
|
| @@ -138,6 +141,9 @@ class Address {
|
| void set_postal_code_number(const base::string16& postal_code_number) {
|
| postal_code_number_ = postal_code_number;
|
| }
|
| + void set_sorting_code(const base::string16& sorting_code) {
|
| + sorting_code_ = sorting_code;
|
| + }
|
| void SetPhoneNumber(const base::string16& phone_number);
|
| void set_object_id(const std::string& object_id) {
|
| object_id_ = object_id;
|
| @@ -154,6 +160,9 @@ class Address {
|
| bool operator!=(const Address& other) const;
|
|
|
| private:
|
| + // Gets the street address on the given line (0-indexed).
|
| + base::string16 GetStreetAddressLine(size_t line) const;
|
| +
|
| // |country_name_code_| should be an ISO 3166-1-alpha-2 (two letter codes, as
|
| // used in DNS). For example, "GB".
|
| std::string country_name_code_;
|
| @@ -161,19 +170,18 @@ class Address {
|
| // The recipient's name. For example "John Doe".
|
| base::string16 recipient_name_;
|
|
|
| - // |address_line_1| and |address_line_2| correspond to the "AddressLine"
|
| - // elements in xAL, which are used to hold unstructured text.
|
| - base::string16 address_line_1_;
|
| - base::string16 address_line_2_;
|
| + // Address lines (arbitrarily many).
|
| + std::vector<base::string16> street_address_;
|
|
|
| // Locality. This is something of a fuzzy term, but it generally refers to
|
| - // the city/town portion of an address. In regions of the world where
|
| - // localities are not well defined or do not fit into this structure well
|
| - // (for example, Japan and China), leave locality_name empty and use
|
| - // |address_line_2|.
|
| + // the city/town portion of an address.
|
| // Examples: US city, IT comune, UK post town.
|
| base::string16 locality_name_;
|
|
|
| + // Dependent locality is used in Korea and China.
|
| + // Example: a Chinese county under the authority of a prefecture-level city.
|
| + base::string16 dependent_locality_name_;
|
| +
|
| // Top-level administrative subdivision of this country.
|
| // Examples: US state, IT region, UK constituent nation, JP prefecture.
|
| // Note: this must be in short form, e.g. TX rather than Texas.
|
| @@ -183,6 +191,9 @@ class Address {
|
| // Examples: "94043", "SW1W", "SW1W 9TQ".
|
| base::string16 postal_code_number_;
|
|
|
| + // Sorting code, e.g. CEDEX in France.
|
| + base::string16 sorting_code_;
|
| +
|
| // A valid international phone number. If |phone_number_| is a user provided
|
| // value, it should have been validated using libphonenumber by clients of
|
| // this class before being set; see http://code.google.com/p/libphonenumber/.
|
|
|