Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(292)

Side by Side Diff: chrome/browser/autofill/autofill_profile.cc

Issue 7528017: Add address line 2 as a distinguishing field for Autofill addresses (in WebUI list) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix a typo Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/autofill/autofill_profile_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autofill/autofill_profile_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698