Commit 7c2bf49b authored by Tommy Li's avatar Tommy Li Committed by Commit Bot

[omnibox] Remove Confirmation Dialog for Remove Suggestion

No one likes the current confirmation dialog. Begin experimentation
without one.

This CL puts in a new flag that can swap on and off the confirm dialog.
The flag is set up so that there is NO confirm dialog by default.
This is the same as how the NTP version: ConfirmNtpSuggestionRemovals.

Bug: 1016514, 929477, 1205
Change-Id: If158e10da3fbdccc847aafe5221fad57c5c3639b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1872182
Commit-Queue: Tommy Li <tommycli@chromium.org>
Reviewed-by: default avatarJustin Donnelly <jdonnelly@chromium.org>
Cr-Commit-Position: refs/heads/master@{#708304}
parent 6b01f32c
......@@ -233,6 +233,12 @@ void OmniboxResultView::ButtonPressed(views::Button* button,
if (button == suggestion_tab_switch_button_) {
OpenMatch(WindowOpenDisposition::SWITCH_TO_TAB, event.time_stamp());
} else if (button == remove_suggestion_button_) {
if (!base::FeatureList::IsEnabled(
omnibox::kConfirmOmniboxSuggestionRemovals)) {
RemoveSuggestion();
return;
}
// Temporarily inhibit the popup closing on blur while we open the remove
// suggestion confirmation bubble.
popup_contents_view_->model()->set_popup_closes_on_blur(false);
......
......@@ -305,4 +305,9 @@ const base::Feature kZeroSuggestionsOnSERP{"OmniboxZeroSuggestionsOnSERP",
const base::Feature kOnDeviceHeadProvider{"OmniboxOnDeviceHeadProvider",
base::FEATURE_DISABLED_BY_DEFAULT};
// If enabled, shows a confirm dialog before removing search suggestions from
// the omnibox. See ConfirmNtpSuggestionRemovals for the NTP equivalent.
const base::Feature kConfirmOmniboxSuggestionRemovals{
"ConfirmOmniboxSuggestionRemovals", base::FEATURE_DISABLED_BY_DEFAULT};
} // namespace omnibox
......@@ -9,7 +9,9 @@
namespace omnibox {
// TODO(dbeam): why is this list not sorted alphabetically?
// Please do not add more features to this "big blob" list.
// Instead, use the categorized and alphabetized lists below this "big blob".
// You can create a new category if none of the existing ones fit.
extern const base::Feature kHideFileUrlScheme;
extern const base::Feature kHideSteadyStateUrlScheme;
extern const base::Feature kHideSteadyStateUrlTrivialSubdomains;
......@@ -58,6 +60,9 @@ extern const base::Feature kZeroSuggestionsOnNTP;
extern const base::Feature kZeroSuggestionsOnNTPRealbox;
extern const base::Feature kZeroSuggestionsOnSERP;
// Suggestions UI - these affect the UI or function of the suggestions popup.
extern const base::Feature kConfirmOmniboxSuggestionRemovals;
} // namespace omnibox
#endif // COMPONENTS_OMNIBOX_COMMON_OMNIBOX_FEATURES_H_
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