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

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

Issue 2906383003: Teach PasswordAutofillAgent sometimes match prefixes of usernames (Closed)
Patch Set: more browser tests 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 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..f9f549c0a92abd1fa170db956d5eef2128201c4e 100644
--- a/components/autofill/core/common/autofill_util.h
+++ b/components/autofill/core/common/autofill_util.h
@@ -56,6 +56,12 @@ bool FieldIsSuggestionSubstringStartingOnTokenBoundary(
const base::string16& field_contents,
bool case_sensitive);
+// Currently, a token for the purposes of this method is defined as {'@'}.
vabr (Chromium) 2017/06/19 12:54:15 nit: Please update the comment not to mention any
+// Returns true if the |full_string| has a |prefix| as a prefix and the prefix
+// ends on a token.
+bool IsPrefixOfEmailEndingAtSign(const base::string16& full_string,
vabr (Chromium) 2017/06/19 12:54:15 nit: EndingAtSign -> EndingWithAtSign (The curren
melandory 2017/06/21 12:00:42 Done.
+ const base::string16& prefix);
+
// Finds the first occurrence of a searched substring |field_contents| within
// the string |suggestion| starting at token boundaries and returns the index to
// the end of the located substring, or base::string16::npos if the substring is

Powered by Google App Engine
This is Rietveld 408576698