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

Unified Diff: components/autofill/core/common/autofill_util.h

Issue 2906383003: Teach PasswordAutofillAgent sometimes match prefixes of usernames (Closed)
Patch Set: . Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: components/autofill/core/common/autofill_util.h
diff --git a/components/autofill/core/common/autofill_util.h b/components/autofill/core/common/autofill_util.h
index 6a67f3ef8704ff75be3fe2617000abbd6e7cf3ef..a2026e4477599f99b5d9aa5dd88a88aa6f191862 100644
--- a/components/autofill/core/common/autofill_util.h
+++ b/components/autofill/core/common/autofill_util.h
@@ -51,10 +51,16 @@ bool IsHintEnabledInKeyboardAccessory();
// Returns true if the |field_contents| is a substring of the |suggestion|
// starting at token boundaries. |field_contents| can span multiple |suggestion|
// tokens.
-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);
+
+// Currently, a token for the purposes of this method is defined as {'@'}.
+// Returns true if the |full_string| has a |prefix| as a prefix and the prefix
+// end on a token.
dvadym 2017/06/01 12:15:56 prefix end -> prefix ends
melandory 2017/06/12 14:56:12 Done.
+bool IsPrefixStartingOnTokenBoundary(const base::string16& full_string,
dvadym 2017/06/01 12:15:56 As far as I understand |prefix| should end at Toke
melandory 2017/06/12 14:56:12 Done.
+ const base::string16& prefix,
+ bool case_sensitive);
// Finds the first occurrence of a searched substring |field_contents| within
// the string |suggestion| starting at token boundaries and returns the index to

Powered by Google App Engine
This is Rietveld 408576698