Chromium Code Reviews| Index: components/autofill/core/common/autofill_util.cc |
| diff --git a/components/autofill/core/common/autofill_util.cc b/components/autofill/core/common/autofill_util.cc |
| index 50e50176d8c336e700bef8af1c7e6bfd865250fd..edde2d48c5ecd6e613f0460ee5f51fecf62fd831 100644 |
| --- a/components/autofill/core/common/autofill_util.cc |
| +++ b/components/autofill/core/common/autofill_util.cc |
| @@ -115,6 +115,12 @@ bool FieldIsSuggestionSubstringStartingOnTokenBoundary( |
| base::string16::npos; |
| } |
| +bool IsPrefixOfEmailEndingWithAtSign(const base::string16& full_string, |
| + const base::string16& prefix) { |
| + return base::StartsWith(full_string, prefix + base::UTF8ToUTF16(""), |
|
vabr (Chromium)
2017/06/21 12:28:07
"" -> "@"
|
| + base::CompareCase::SENSITIVE); |
| +} |
| + |
| size_t GetTextSelectionStart(const base::string16& suggestion, |
| const base::string16& field_contents, |
| bool case_sensitive) { |