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

Side by Side Diff: components/autofill/core/browser/autofill_data_util.cc

Issue 2956513002: [Autofill] Adding a prefix to the list of family names. (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "components/autofill/core/browser/autofill_data_util.h" 5 #include "components/autofill/core/browser/autofill_data_util.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/i18n/char_iterator.h" 10 #include "base/i18n/char_iterator.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 "captain", "col", "cpt", "dr", "gen", "general", "lcdr", 51 "captain", "col", "cpt", "dr", "gen", "general", "lcdr",
52 "lt", "ltc", "ltg", "ltjg", "maj", "major", "mg", 52 "lt", "ltc", "ltg", "ltjg", "maj", "major", "mg",
53 "mr", "mrs", "ms", "pastor", "prof", "rep", "reverend", 53 "mr", "mrs", "ms", "pastor", "prof", "rep", "reverend",
54 "rev", "sen", "st"}; 54 "rev", "sen", "st"};
55 55
56 const char* const name_suffixes[] = {"b.a", "ba", "d.d.s", "dds", "i", "ii", 56 const char* const name_suffixes[] = {"b.a", "ba", "d.d.s", "dds", "i", "ii",
57 "iii", "iv", "ix", "jr", "m.a", "m.d", 57 "iii", "iv", "ix", "jr", "m.a", "m.d",
58 "ma", "md", "ms", "ph.d", "phd", "sr", 58 "ma", "md", "ms", "ph.d", "phd", "sr",
59 "v", "vi", "vii", "viii", "x"}; 59 "v", "vi", "vii", "viii", "x"};
60 60
61 const char* const family_name_prefixes[] = {"d'", "de", "del", "der", "di", 61 const char* const family_name_prefixes[] = {"d'", "de", "del", "den", "der",
62 "la", "le", "mc", "san", "st", 62 "di", "la", "le", "mc", "san",
63 "ter", "van", "von"}; 63 "st", "ter", "van", "von"};
64 64
65 // The common and non-ambiguous CJK surnames (last names) that have more than 65 // The common and non-ambiguous CJK surnames (last names) that have more than
66 // one character. 66 // one character.
67 const char* common_cjk_multi_char_surnames[] = { 67 const char* common_cjk_multi_char_surnames[] = {
68 // Korean, taken from the list of surnames: 68 // Korean, taken from the list of surnames:
69 // https://ko.wikipedia.org/wiki/%ED%95%9C%EA%B5%AD%EC%9D%98_%EC%84%B1%EC%94%A 8_%EB%AA%A9%EB%A1%9D 69 // https://ko.wikipedia.org/wiki/%ED%95%9C%EA%B5%AD%EC%9D%98_%EC%84%B1%EC%94%A 8_%EB%AA%A9%EB%A1%9D
70 "남궁", "사공", "서문", "선우", "제갈", "황보", "독고", "망절", 70 "남궁", "사공", "서문", "선우", "제갈", "황보", "독고", "망절",
71 71
72 // Chinese, taken from the top 10 Chinese 2-character surnames: 72 // Chinese, taken from the top 10 Chinese 2-character surnames:
73 // https://zh.wikipedia.org/wiki/%E8%A4%87%E5%A7%93#.E5.B8.B8.E8.A6.8B.E7.9A.8 4.E8.A4.87.E5.A7.93 73 // https://zh.wikipedia.org/wiki/%E8%A4%87%E5%A7%93#.E5.B8.B8.E8.A6.8B.E7.9A.8 4.E8.A4.87.E5.A7.93
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 437
438 return re2::RE2::FullMatch(country_code, "^[A-Z]{2}$"); 438 return re2::RE2::FullMatch(country_code, "^[A-Z]{2}$");
439 } 439 }
440 440
441 bool IsValidCountryCode(const base::string16& country_code) { 441 bool IsValidCountryCode(const base::string16& country_code) {
442 return IsValidCountryCode(base::UTF16ToUTF8(country_code)); 442 return IsValidCountryCode(base::UTF16ToUTF8(country_code));
443 } 443 }
444 444
445 } // namespace data_util 445 } // namespace data_util
446 } // namespace autofill 446 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698