| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/autofill/autofill_profile.h" | 5 #include "chrome/browser/autofill/autofill_profile.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 // list. Otherwise, |excluded_field| is ignored, and should be set to | 41 // list. Otherwise, |excluded_field| is ignored, and should be set to |
| 42 // |UNKNOWN_TYPE| by convention. The resulting list of fields is sorted in | 42 // |UNKNOWN_TYPE| by convention. The resulting list of fields is sorted in |
| 43 // decreasing order of importance. | 43 // decreasing order of importance. |
| 44 void GetFieldsForDistinguishingProfiles( | 44 void GetFieldsForDistinguishingProfiles( |
| 45 const std::vector<AutofillFieldType>* suggested_fields, | 45 const std::vector<AutofillFieldType>* suggested_fields, |
| 46 AutofillFieldType excluded_field, | 46 AutofillFieldType excluded_field, |
| 47 std::vector<AutofillFieldType>* distinguishing_fields) { | 47 std::vector<AutofillFieldType>* distinguishing_fields) { |
| 48 static const AutofillFieldType kDefaultDistinguishingFields[] = { | 48 static const AutofillFieldType kDefaultDistinguishingFields[] = { |
| 49 NAME_FULL, | 49 NAME_FULL, |
| 50 ADDRESS_HOME_LINE1, | 50 ADDRESS_HOME_LINE1, |
| 51 ADDRESS_HOME_LINE2, |
| 51 ADDRESS_HOME_CITY, | 52 ADDRESS_HOME_CITY, |
| 52 ADDRESS_HOME_STATE, | 53 ADDRESS_HOME_STATE, |
| 53 ADDRESS_HOME_ZIP, | 54 ADDRESS_HOME_ZIP, |
| 54 ADDRESS_HOME_COUNTRY, | 55 ADDRESS_HOME_COUNTRY, |
| 55 EMAIL_ADDRESS, | 56 EMAIL_ADDRESS, |
| 56 PHONE_HOME_WHOLE_NUMBER, | 57 PHONE_HOME_WHOLE_NUMBER, |
| 57 PHONE_FAX_WHOLE_NUMBER, | 58 PHONE_FAX_WHOLE_NUMBER, |
| 58 COMPANY_NAME, | 59 COMPANY_NAME, |
| 59 }; | 60 }; |
| 60 | 61 |
| (...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 761 << UTF16ToUTF8(profile.GetInfo(ADDRESS_HOME_STATE)) | 762 << UTF16ToUTF8(profile.GetInfo(ADDRESS_HOME_STATE)) |
| 762 << " " | 763 << " " |
| 763 << UTF16ToUTF8(profile.GetInfo(ADDRESS_HOME_ZIP)) | 764 << UTF16ToUTF8(profile.GetInfo(ADDRESS_HOME_ZIP)) |
| 764 << " " | 765 << " " |
| 765 << UTF16ToUTF8(profile.GetInfo(ADDRESS_HOME_COUNTRY)) | 766 << UTF16ToUTF8(profile.GetInfo(ADDRESS_HOME_COUNTRY)) |
| 766 << " " | 767 << " " |
| 767 << UTF16ToUTF8(MultiString(profile, PHONE_HOME_WHOLE_NUMBER)) | 768 << UTF16ToUTF8(MultiString(profile, PHONE_HOME_WHOLE_NUMBER)) |
| 768 << " " | 769 << " " |
| 769 << UTF16ToUTF8(MultiString(profile, PHONE_FAX_WHOLE_NUMBER)); | 770 << UTF16ToUTF8(MultiString(profile, PHONE_FAX_WHOLE_NUMBER)); |
| 770 } | 771 } |
| OLD | NEW |