| 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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 | 411 |
| 412 default: | 412 default: |
| 413 NOTREACHED(); | 413 NOTREACHED(); |
| 414 return false; | 414 return false; |
| 415 } | 415 } |
| 416 } | 416 } |
| 417 | 417 |
| 418 int AutofillProfile::Compare(const AutofillProfile& profile) const { | 418 int AutofillProfile::Compare(const AutofillProfile& profile) const { |
| 419 const ServerFieldType single_value_types[] = { | 419 const ServerFieldType single_value_types[] = { |
| 420 COMPANY_NAME, | 420 COMPANY_NAME, |
| 421 ADDRESS_HOME_LINE1, | 421 ADDRESS_HOME_STREET_ADDRESS, |
| 422 ADDRESS_HOME_LINE2, | |
| 423 ADDRESS_HOME_DEPENDENT_LOCALITY, | 422 ADDRESS_HOME_DEPENDENT_LOCALITY, |
| 424 ADDRESS_HOME_CITY, | 423 ADDRESS_HOME_CITY, |
| 425 ADDRESS_HOME_STATE, | 424 ADDRESS_HOME_STATE, |
| 426 ADDRESS_HOME_ZIP, | 425 ADDRESS_HOME_ZIP, |
| 427 ADDRESS_HOME_SORTING_CODE, | 426 ADDRESS_HOME_SORTING_CODE, |
| 428 ADDRESS_HOME_COUNTRY, | 427 ADDRESS_HOME_COUNTRY, |
| 429 }; | 428 }; |
| 430 | 429 |
| 431 for (size_t i = 0; i < arraysize(single_value_types); ++i) { | 430 for (size_t i = 0; i < arraysize(single_value_types); ++i) { |
| 432 int comparison = GetRawInfo(single_value_types[i]).compare( | 431 int comparison = GetRawInfo(single_value_types[i]).compare( |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 867 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_SORTING_CODE)) | 866 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_SORTING_CODE)) |
| 868 << " " | 867 << " " |
| 869 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_COUNTRY)) | 868 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_COUNTRY)) |
| 870 << " " | 869 << " " |
| 871 << profile.language_code() | 870 << profile.language_code() |
| 872 << " " | 871 << " " |
| 873 << UTF16ToUTF8(MultiString(profile, PHONE_HOME_WHOLE_NUMBER)); | 872 << UTF16ToUTF8(MultiString(profile, PHONE_HOME_WHOLE_NUMBER)); |
| 874 } | 873 } |
| 875 | 874 |
| 876 } // namespace autofill | 875 } // namespace autofill |
| OLD | NEW |