Commit 6a8262b4 authored by John Z Wu's avatar John Z Wu Committed by Commit Bot

Remove obsolete suggestions clear-form and show-account-card

Change-Id: I823b0892c4eaeac5555b51e4d753311c191b7cad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1949699Reviewed-by: default avatarHiroshi Ichikawa <ichikawa@chromium.org>
Commit-Queue: John Wu <jzw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#721581}
parent 561bb1b2
...@@ -406,15 +406,12 @@ fetchNonPasswordSuggestionsForFormWithName:(NSString*)formName ...@@ -406,15 +406,12 @@ fetchNonPasswordSuggestionsForFormWithName:(NSString*)formName
delegate { delegate {
// frontend_id is > 0 for Autofill suggestions, == 0 for Autocomplete // frontend_id is > 0 for Autofill suggestions, == 0 for Autocomplete
// suggestions, and < 0 for special suggestions such as clear form. // suggestions, and < 0 for special suggestions such as clear form.
// We only want Autofill suggestions.
std::vector<autofill::Suggestion> filtered_suggestions; std::vector<autofill::Suggestion> filtered_suggestions;
std::copy_if(suggestions.begin(), suggestions.end(), std::copy_if(suggestions.begin(), suggestions.end(),
std::back_inserter(filtered_suggestions), std::back_inserter(filtered_suggestions),
[](autofill::Suggestion suggestion) { [](autofill::Suggestion suggestion) {
return suggestion.frontend_id > 0 || return suggestion.frontend_id > 0;
suggestion.frontend_id ==
autofill::POPUP_ITEM_ID_SHOW_ACCOUNT_CARDS ||
suggestion.frontend_id ==
autofill::POPUP_ITEM_ID_CLEAR_FORM;
}); });
[_autofillAgent showAutofillPopup:filtered_suggestions [_autofillAgent showAutofillPopup:filtered_suggestions
popupDelegate:delegate]; popupDelegate:delegate];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment