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

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

Issue 7892048: Autofill: Remove fax number completely. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment fix. Created 9 years, 3 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 | « chrome/browser/autofill/field_types.h ('k') | chrome/browser/autofill/form_structure.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/form_field.h" 5 #include "chrome/browser/autofill/form_field.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // static 48 // static
49 void FormField::ParseFormFields(const std::vector<AutofillField*>& fields, 49 void FormField::ParseFormFields(const std::vector<AutofillField*>& fields,
50 FieldTypeMap* map) { 50 FieldTypeMap* map) {
51 // Set up a working copy of the fields to be processed. 51 // Set up a working copy of the fields to be processed.
52 std::vector<const AutofillField*> remaining_fields(fields.size()); 52 std::vector<const AutofillField*> remaining_fields(fields.size());
53 std::copy(fields.begin(), fields.end(), remaining_fields.begin()); 53 std::copy(fields.begin(), fields.end(), remaining_fields.begin());
54 54
55 // Email pass. 55 // Email pass.
56 ParseFormFieldsPass(EmailField::Parse, &remaining_fields, map); 56 ParseFormFieldsPass(EmailField::Parse, &remaining_fields, map);
57 57
58 // Phone/fax pass. 58 // Phone pass.
59 ParseFormFieldsPass(PhoneField::Parse, &remaining_fields, map); 59 ParseFormFieldsPass(PhoneField::Parse, &remaining_fields, map);
60 60
61 // Address pass. 61 // Address pass.
62 ParseFormFieldsPass(AddressField::Parse, &remaining_fields, map); 62 ParseFormFieldsPass(AddressField::Parse, &remaining_fields, map);
63 63
64 // Credit card pass. 64 // Credit card pass.
65 ParseFormFieldsPass(CreditCardField::Parse, &remaining_fields, map); 65 ParseFormFieldsPass(CreditCardField::Parse, &remaining_fields, map);
66 66
67 // Name pass. 67 // Name pass.
68 ParseFormFieldsPass(NameField::Parse, &remaining_fields, map); 68 ParseFormFieldsPass(NameField::Parse, &remaining_fields, map);
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 continue; 176 continue;
177 } 177 }
178 178
179 // Add entries into the map for each field type found in |form_field|. 179 // Add entries into the map for each field type found in |form_field|.
180 bool ok = form_field->ClassifyField(map); 180 bool ok = form_field->ClassifyField(map);
181 DCHECK(ok); 181 DCHECK(ok);
182 } 182 }
183 183
184 std::swap(*fields, remaining_fields); 184 std::swap(*fields, remaining_fields);
185 } 185 }
OLDNEW
« no previous file with comments | « chrome/browser/autofill/field_types.h ('k') | chrome/browser/autofill/form_structure.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698