Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "components/autofill/browser/wallet/wallet_address.h" | 5 #include "components/autofill/browser/wallet/wallet_address.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "components/autofill/browser/autofill_country.h" | 10 #include "components/autofill/browser/autofill_country.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 75 postal_code_number, | 75 postal_code_number, |
| 76 phone_number, | 76 phone_number, |
| 77 object_id); | 77 object_id); |
| 78 } | 78 } |
| 79 | 79 |
| 80 } // namespace | 80 } // namespace |
| 81 | 81 |
| 82 Address::Address() {} | 82 Address::Address() {} |
| 83 | 83 |
| 84 Address::Address(const AutofillProfile& profile) | 84 Address::Address(const AutofillProfile& profile) |
| 85 : country_name_code_(profile.CountryCode()), | 85 : country_name_code_(WideToASCII(profile.GetRawInfo(ADDRESS_HOME_COUNTRY))), |
|
Ilya Sherman
2013/04/05 05:18:01
I think you want UTF16ToASCII here... though actua
jam
2013/04/05 06:45:54
Done
| |
| 86 recipient_name_(profile.GetRawInfo(NAME_FULL)), | 86 recipient_name_(profile.GetRawInfo(NAME_FULL)), |
| 87 address_line_1_(profile.GetRawInfo(ADDRESS_HOME_LINE1)), | 87 address_line_1_(profile.GetRawInfo(ADDRESS_HOME_LINE1)), |
| 88 address_line_2_(profile.GetRawInfo(ADDRESS_HOME_LINE2)), | 88 address_line_2_(profile.GetRawInfo(ADDRESS_HOME_LINE2)), |
| 89 locality_name_(profile.GetRawInfo(ADDRESS_HOME_CITY)), | 89 locality_name_(profile.GetRawInfo(ADDRESS_HOME_CITY)), |
| 90 administrative_area_name_(profile.GetRawInfo(ADDRESS_HOME_STATE)), | 90 administrative_area_name_(profile.GetRawInfo(ADDRESS_HOME_STATE)), |
| 91 postal_code_number_(profile.GetRawInfo(ADDRESS_HOME_ZIP)), | 91 postal_code_number_(profile.GetRawInfo(ADDRESS_HOME_ZIP)), |
| 92 phone_number_(profile.GetRawInfo(PHONE_HOME_WHOLE_NUMBER)) {} | 92 phone_number_(profile.GetRawInfo(PHONE_HOME_WHOLE_NUMBER)) {} |
| 93 | 93 |
| 94 Address::Address(const std::string& country_name_code, | 94 Address::Address(const std::string& country_name_code, |
| 95 const string16& recipient_name, | 95 const string16& recipient_name, |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 279 phone_number_ == other.phone_number_ && | 279 phone_number_ == other.phone_number_ && |
| 280 object_id_ == other.object_id_; | 280 object_id_ == other.object_id_; |
| 281 } | 281 } |
| 282 | 282 |
| 283 bool Address::operator!=(const Address& other) const { | 283 bool Address::operator!=(const Address& other) const { |
| 284 return !(*this == other); | 284 return !(*this == other); |
| 285 } | 285 } |
| 286 | 286 |
| 287 } // namespace wallet | 287 } // namespace wallet |
| 288 } // namespace autofill | 288 } // namespace autofill |
| OLD | NEW |