| 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..b1c86d36203a6ac4dab6ab4a646a7dec92c66f54 100644
|
| --- a/components/autofill/core/common/autofill_util.cc
|
| +++ b/components/autofill/core/common/autofill_util.cc
|
| @@ -99,10 +99,9 @@ bool IsHintEnabledInKeyboardAccessory() {
|
| #endif
|
| }
|
|
|
| -bool FieldIsSuggestionSubstringStartingOnTokenBoundary(
|
| - const base::string16& suggestion,
|
| - const base::string16& field_contents,
|
| - bool case_sensitive) {
|
| +bool IsSubstringStartingOnTokenBoundary(const base::string16& suggestion,
|
| + const base::string16& field_contents,
|
| + bool case_sensitive) {
|
| if (!IsFeatureSubstringMatchEnabled()) {
|
| return base::StartsWith(suggestion, field_contents,
|
| case_sensitive
|
| @@ -115,6 +114,15 @@ bool FieldIsSuggestionSubstringStartingOnTokenBoundary(
|
| base::string16::npos;
|
| }
|
|
|
| +bool IsPrefixEndingOnTokenBoundary(const base::string16& full_string,
|
| + const base::string16& prefix) {
|
| + if (base::StartsWith(full_string, prefix, base::CompareCase::SENSITIVE)) {
|
| + return (full_string.size() > prefix.size() &&
|
| + full_string[prefix.size()] == '@');
|
| + }
|
| + return false;
|
| +}
|
| +
|
| size_t GetTextSelectionStart(const base::string16& suggestion,
|
| const base::string16& field_contents,
|
| bool case_sensitive) {
|
|
|