Skip to content

Commit

Permalink
Bring ZPS back to Shortcuts Widget
Browse files Browse the repository at this point in the history
The change addresses a problem where the zero-prefix suggestions have
disappeared from the shortcuts widget.

The shortcuts widget is in a transitional state, where it may soon
be presenting content with on-focus suggestions for the SRP, but
until that time comes, it's not exactly matching the "typical"
scenario where the zero-prefix suggestions are shown.

The goal is to be sure we continue to present suggestions on this
surface.

(cherry picked from commit ca0a3c7)

Bug: 1346402
Change-Id: I1bf93c74c05ce09d8acb1250d61950825a20cf5c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3781747
Reviewed-by: Moe Ahmadi <mahmadi@chromium.org>
Commit-Queue: Tomasz Wiszkowski <ender@google.com>
Cr-Original-Commit-Position: refs/heads/main@{#1027044}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3784759
Commit-Queue: Moe Ahmadi <mahmadi@chromium.org>
Auto-Submit: Tomasz Wiszkowski <ender@google.com>
Cr-Commit-Position: refs/branch-heads/5195@{#14}
Cr-Branched-From: 7aa3f07-refs/heads/main@{#1027018}
  • Loading branch information
tomasz-wiszkowski authored and Chromium LUCI CQ committed Jul 25, 2022
1 parent 614d2e9 commit 0238f34
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions components/omnibox/browser/zero_suggest_provider.cc
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@ ZeroSuggestProvider::ResultType ZeroSuggestProvider::TypeOfResultToRun(
if (focus_type == OmniboxFocusType::ON_FOCUS &&
input.type() == OmniboxInputType::EMPTY) {
return ZeroSuggestProvider::REMOTE_NO_URL;
} else if (page_class == OmniboxEventProto::ANDROID_SHORTCUTS_WIDGET &&
focus_type == OmniboxFocusType::ON_FOCUS &&
input.type() == OmniboxInputType::URL) {
return ZeroSuggestProvider::REMOTE_NO_URL;
}
}

Expand Down

0 comments on commit 0238f34

Please sign in to comment.