Commit 913e137a authored by Daniel Clark's avatar Daniel Clark Committed by Commit Bot

Removed unused options in AutofillAgent::ShowSuggestionsOptions

I noticed while working on something else that
AutofillAgent::ShowSuggestionsOptions's datalist_only is never
referenced, and show_password_suggestions_only is referenced but never
set.  This change deletes both bits of dead code.

These were initially added back in 2014 via
https://codereview.chromium.org/753393004/diff/60001/components/autofill/content/renderer/autofill_agent.h
Apparently the code has shifted since then to render them unused.

Bug: 1127443
Change-Id: I52edd4864bc7441cdada2cd018073f5881b586db
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2406167Reviewed-by: default avatarEvan Stade <estade@chromium.org>
Commit-Queue: Dan Clark <daniec@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#806355}
parent 909aa0c8
...@@ -114,7 +114,6 @@ AutofillAgent::ShowSuggestionsOptions::ShowSuggestionsOptions() ...@@ -114,7 +114,6 @@ AutofillAgent::ShowSuggestionsOptions::ShowSuggestionsOptions()
: autofill_on_empty_values(false), : autofill_on_empty_values(false),
requires_caret_at_end(false), requires_caret_at_end(false),
show_full_suggestion_list(false), show_full_suggestion_list(false),
show_password_suggestions_only(false),
autoselect_first_suggestion(false) {} autoselect_first_suggestion(false) {}
AutofillAgent::AutofillAgent(content::RenderFrame* render_frame, AutofillAgent::AutofillAgent(content::RenderFrame* render_frame,
...@@ -664,9 +663,6 @@ void AutofillAgent::ShowSuggestions(const WebFormControlElement& element, ...@@ -664,9 +663,6 @@ void AutofillAgent::ShowSuggestions(const WebFormControlElement& element,
if (is_generation_popup_possibly_visible_) if (is_generation_popup_possibly_visible_)
return; return;
if (options.show_password_suggestions_only)
return;
// Password field elements should only have suggestions shown by the password // Password field elements should only have suggestions shown by the password
// autofill agent. // autofill agent.
// The /*disable presubmit*/ comment below is used to disable a presubmit // The /*disable presubmit*/ comment below is used to disable a presubmit
......
...@@ -142,20 +142,11 @@ class AutofillAgent : public content::RenderFrameObserver, ...@@ -142,20 +142,11 @@ class AutofillAgent : public content::RenderFrameObserver,
// after the last character in the element. // after the last character in the element.
bool requires_caret_at_end; bool requires_caret_at_end;
// Specifies that all of <datalist> suggestions and no autofill suggestions
// are shown. |autofill_on_empty_values| and |requires_caret_at_end| are
// ignored if |datalist_only| is true.
bool datalist_only;
// Specifies that all autofill suggestions should be shown and none should // Specifies that all autofill suggestions should be shown and none should
// be elided because of the current value of |element| (relevant for inline // be elided because of the current value of |element| (relevant for inline
// autocomplete). // autocomplete).
bool show_full_suggestion_list; bool show_full_suggestion_list;
// Specifies that only show a suggestions box if |element| is part of a
// password form, otherwise show no suggestions.
bool show_password_suggestions_only;
// Specifies that the first suggestion must be auto-selected when the // Specifies that the first suggestion must be auto-selected when the
// dropdown is shown. Enabled when the user presses ARROW_DOWN on a field. // dropdown is shown. Enabled when the user presses ARROW_DOWN on a field.
bool autoselect_first_suggestion; bool autoselect_first_suggestion;
......
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