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 // This file contains UTF8 strings that we want as char arrays. To avoid | 5 // This file contains UTF8 strings that we want as char arrays. To avoid |
6 // different compilers, we use a script to convert the UTF8 strings into | 6 // different compilers, we use a script to convert the UTF8 strings into |
7 // numeric literals (\x##). | 7 // numeric literals (\x##). |
8 | 8 |
9 #include "components/autofill/core/browser/autofill_regex_constants.h" | 9 #include "components/autofill/core/browser/autofill_regex_constants.h" |
10 | 10 |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 "|numéro" // fr-FR | 142 "|numéro" // fr-FR |
143 "|カード番号" // ja-JP | 143 "|カード番号" // ja-JP |
144 "|Номер.*карты" // ru | 144 "|Номер.*карты" // ru |
145 "|信用卡号|信用卡号码" // zh-CN | 145 "|信用卡号|信用卡号码" // zh-CN |
146 "|信用卡卡號" // zh-TW | 146 "|信用卡卡號" // zh-TW |
147 "|카드"; // ko-KR | 147 "|카드"; // ko-KR |
148 const char kCardCvcRe[] = | 148 const char kCardCvcRe[] = |
149 "verification|card identification|security code|card code" | 149 "verification|card identification|security code|card code" |
150 "|cvn|cvv|cvc|csc|cvd|cid|ccv" | 150 "|cvn|cvv|cvc|csc|cvd|cid|ccv" |
151 "|\\bcid\\b"; | 151 "|\\bcid\\b"; |
152 const char kCardTypeRe[] = | |
153 "(card|cc|payment).?type|payment.?method|card.*brand"; | |
154 | 152 |
155 // "Expiration date" is the most common label here, but some pages have | 153 // "Expiration date" is the most common label here, but some pages have |
156 // "Expires", "exp. date" or "exp. month" and "exp. year". We also look | 154 // "Expires", "exp. date" or "exp. month" and "exp. year". We also look |
157 // for the field names ccmonth and ccyear, which appear on at least 4 of | 155 // for the field names ccmonth and ccyear, which appear on at least 4 of |
158 // our test pages. | 156 // our test pages. |
159 | 157 |
160 // On at least one page (The China Shop2.html) we find only the labels | 158 // On at least one page (The China Shop2.html) we find only the labels |
161 // "month" and "year". So for now we match these words directly; we'll | 159 // "month" and "year". So for now we match these words directly; we'll |
162 // see if this turns out to be too general. | 160 // see if this turns out to be too general. |
163 | 161 |
(...skipping 26 matching lines...) Expand all Loading... |
190 "exp.*date.*[^y]yy([^y]|$)"; | 188 "exp.*date.*[^y]yy([^y]|$)"; |
191 const char kExpirationDateRe[] = | 189 const char kExpirationDateRe[] = |
192 "expir|exp.*date" | 190 "expir|exp.*date" |
193 "|gueltig|gültig" // de-DE | 191 "|gueltig|gültig" // de-DE |
194 "|fecha" // es | 192 "|fecha" // es |
195 "|date.*exp" // fr-FR | 193 "|date.*exp" // fr-FR |
196 "|scadenza" // it-IT | 194 "|scadenza" // it-IT |
197 "|有効期限" // ja-JP | 195 "|有効期限" // ja-JP |
198 "|validade" // pt-BR, pt-PT | 196 "|validade" // pt-BR, pt-PT |
199 "|Срок действия карты"; // ru | 197 "|Срок действия карты"; // ru |
200 const char kCardIgnoredRe[] = | |
201 "^card"; | |
202 const char kGiftCardRe[] = | 198 const char kGiftCardRe[] = |
203 "gift.?card"; | 199 "gift.?card"; |
204 | 200 |
205 | 201 |
206 ///////////////////////////////////////////////////////////////////////////// | 202 ///////////////////////////////////////////////////////////////////////////// |
207 // email_field.cc | 203 // email_field.cc |
208 ///////////////////////////////////////////////////////////////////////////// | 204 ///////////////////////////////////////////////////////////////////////////// |
209 const char kEmailRe[] = | 205 const char kEmailRe[] = |
210 "e.?mail" | 206 "e.?mail" |
211 "|courriel" // fr | 207 "|courriel" // fr |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 "prefix|exchange" | 285 "prefix|exchange" |
290 "|preselection" // fr-FR | 286 "|preselection" // fr-FR |
291 "|ddd"; // pt-BR, pt-PT | 287 "|ddd"; // pt-BR, pt-PT |
292 const char kPhoneSuffixRe[] = | 288 const char kPhoneSuffixRe[] = |
293 "suffix"; | 289 "suffix"; |
294 const char kPhoneExtensionRe[] = | 290 const char kPhoneExtensionRe[] = |
295 "\\bext|ext\\b|extension" | 291 "\\bext|ext\\b|extension" |
296 "|ramal"; // pt-BR, pt-PT | 292 "|ramal"; // pt-BR, pt-PT |
297 | 293 |
298 } // namespace autofill | 294 } // namespace autofill |
OLD | NEW |