| 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 #include "components/autofill/core/browser/autofill_profile.h" | 5 #include "components/autofill/core/browser/autofill_profile.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <functional> | 8 #include <functional> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <ostream> | 10 #include <ostream> |
| (...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 ADDRESS_HOME_STREET_ADDRESS)), | 629 ADDRESS_HOME_STREET_ADDRESS)), |
| 630 CanonicalizeProfileString(GetRawInfo( | 630 CanonicalizeProfileString(GetRawInfo( |
| 631 ADDRESS_HOME_STREET_ADDRESS)))) { | 631 ADDRESS_HOME_STREET_ADDRESS)))) { |
| 632 return false; | 632 return false; |
| 633 } | 633 } |
| 634 continue; | 634 continue; |
| 635 } | 635 } |
| 636 // Special case for the state to support abbreviations. Currently only the | 636 // Special case for the state to support abbreviations. Currently only the |
| 637 // US states are supported. | 637 // US states are supported. |
| 638 if (field_type == ADDRESS_HOME_STATE) { | 638 if (field_type == ADDRESS_HOME_STATE) { |
| 639 base::string16 full, abbreviation; | 639 base::string16 full; |
| 640 base::string16 abbreviation; |
| 640 state_names::GetNameAndAbbreviation(GetRawInfo(ADDRESS_HOME_STATE), | 641 state_names::GetNameAndAbbreviation(GetRawInfo(ADDRESS_HOME_STATE), |
| 641 &full, &abbreviation); | 642 &full, &abbreviation); |
| 642 if (compare.StringsEqual(profile.GetRawInfo(ADDRESS_HOME_STATE), | 643 if (compare.StringsEqual(profile.GetRawInfo(ADDRESS_HOME_STATE), |
| 643 full) || | 644 full) || |
| 644 compare.StringsEqual(profile.GetRawInfo(ADDRESS_HOME_STATE), | 645 compare.StringsEqual(profile.GetRawInfo(ADDRESS_HOME_STATE), |
| 645 abbreviation)) | 646 abbreviation)) |
| 646 continue; | 647 continue; |
| 647 } | 648 } |
| 648 if (!compare.StringsEqual(profile.GetRawInfo(field_type), | 649 if (!compare.StringsEqual(profile.GetRawInfo(field_type), |
| 649 GetRawInfo(field_type))) { | 650 GetRawInfo(field_type))) { |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1047 << " " << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_CITY)) << " " | 1048 << " " << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_CITY)) << " " |
| 1048 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_STATE)) << " " | 1049 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_STATE)) << " " |
| 1049 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_ZIP)) << " " | 1050 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_ZIP)) << " " |
| 1050 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_SORTING_CODE)) << " " | 1051 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_SORTING_CODE)) << " " |
| 1051 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_COUNTRY)) << " " | 1052 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_COUNTRY)) << " " |
| 1052 << profile.language_code() << " " | 1053 << profile.language_code() << " " |
| 1053 << UTF16ToUTF8(profile.GetRawInfo(PHONE_HOME_WHOLE_NUMBER)); | 1054 << UTF16ToUTF8(profile.GetRawInfo(PHONE_HOME_WHOLE_NUMBER)); |
| 1054 } | 1055 } |
| 1055 | 1056 |
| 1056 } // namespace autofill | 1057 } // namespace autofill |
| OLD | NEW |