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

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

Issue 11428071: support CC expiration dates in imperative autocomplete dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 8 years 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/ui/autofill/autofill_dialog_comboboxes.h » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_structure.h" 5 #include "chrome/browser/autofill/form_structure.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 if (autocomplete_type == "cc-exp-month") 183 if (autocomplete_type == "cc-exp-month")
184 return CREDIT_CARD_EXP_MONTH; 184 return CREDIT_CARD_EXP_MONTH;
185 185
186 if (autocomplete_type == "cc-exp-year") { 186 if (autocomplete_type == "cc-exp-year") {
187 if (field.max_length == 2) 187 if (field.max_length == 2)
188 return CREDIT_CARD_EXP_2_DIGIT_YEAR; 188 return CREDIT_CARD_EXP_2_DIGIT_YEAR;
189 else 189 else
190 return CREDIT_CARD_EXP_4_DIGIT_YEAR; 190 return CREDIT_CARD_EXP_4_DIGIT_YEAR;
191 } 191 }
192 192
193 if (autocomplete_type == "cc-csc")
194 return CREDIT_CARD_VERIFICATION_CODE;
195
193 if (autocomplete_type == "tel") 196 if (autocomplete_type == "tel")
194 return PHONE_HOME_WHOLE_NUMBER; 197 return PHONE_HOME_WHOLE_NUMBER;
195 198
196 if (autocomplete_type == "tel-country-code") 199 if (autocomplete_type == "tel-country-code")
197 return PHONE_HOME_COUNTRY_CODE; 200 return PHONE_HOME_COUNTRY_CODE;
198 201
199 if (autocomplete_type == "tel-national") 202 if (autocomplete_type == "tel-national")
200 return PHONE_HOME_CITY_AND_NUMBER; 203 return PHONE_HOME_CITY_AND_NUMBER;
201 204
202 if (autocomplete_type == "tel-area-code") 205 if (autocomplete_type == "tel-area-code")
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 for (std::vector<AutofillField*>::iterator field = fields_.begin(); 1056 for (std::vector<AutofillField*>::iterator field = fields_.begin();
1054 field != fields_.end(); ++field) { 1057 field != fields_.end(); ++field) {
1055 AutofillType::FieldTypeGroup field_type_group = 1058 AutofillType::FieldTypeGroup field_type_group =
1056 AutofillType((*field)->type()).group(); 1059 AutofillType((*field)->type()).group();
1057 if (field_type_group == AutofillType::CREDIT_CARD) 1060 if (field_type_group == AutofillType::CREDIT_CARD)
1058 (*field)->set_section((*field)->section() + "-cc"); 1061 (*field)->set_section((*field)->section() + "-cc");
1059 else 1062 else
1060 (*field)->set_section((*field)->section() + "-default"); 1063 (*field)->set_section((*field)->section() + "-default");
1061 } 1064 }
1062 } 1065 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/autofill_dialog_comboboxes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698