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

Unified Diff: components/autofill/core/browser/personal_data_manager.cc

Issue 1208133002: [Autofill/Autocomplete Feature] Substring matching instead of prefix matching. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added |match_start| usage. Created 5 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/browser/personal_data_manager.cc
diff --git a/components/autofill/core/browser/personal_data_manager.cc b/components/autofill/core/browser/personal_data_manager.cc
index ca41fd5b5cf8a22f8287fdc02fb3bdc74b62855d..d01745027ad5044bbc2ec3123a11d39b8f985c33 100644
--- a/components/autofill/core/browser/personal_data_manager.cc
+++ b/components/autofill/core/browser/personal_data_manager.cc
@@ -800,6 +800,7 @@ std::vector<Suggestion> PersonalDataManager::GetProfileSuggestions(
matched_profiles.push_back(profile);
suggestions.push_back(Suggestion(value));
suggestions.back().backend_id = profile->guid();
+ suggestions.back().match_start = field_contents.size();
}
}
@@ -916,6 +917,7 @@ std::vector<Suggestion> PersonalDataManager::GetCreditCardSuggestions(
suggestion->value = credit_card->GetInfo(type, app_locale_);
suggestion->icon = base::UTF8ToUTF16(credit_card->type());
suggestion->backend_id = credit_card->guid();
+ suggestion->match_start = field_contents.size();
// If the value is the card number, the label is the expiration date.
// Otherwise the label is the card number, or if that is empty the
« no previous file with comments | « components/autofill/core/browser/autofill_popup_delegate.h ('k') | components/autofill/core/browser/suggestion.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698