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

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

Issue 2906383003: Teach PasswordAutofillAgent sometimes match prefixes of usernames (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 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..e51d7bd3d4f241e06c579d35fa0c8002829861da 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 {'@'}.
+// Returns true if the |full_string| has a |prefix| as a prefix and the prefix
+// ends on a token.
+bool IsPrefixOfEmailEndingWithAtSign(const base::string16& full_string,
+ 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