Commit 225e3c4c authored by Matthew Jones's avatar Matthew Jones Committed by Commit Bot

Block edit-url suggestion on NTP

Native pages do not have a URL in the omnibox by default. In these
cases we shouldn't show the edit-url suggestion. The side effect of
this is text in the omnibox being erased while typing a url.

Bug: 925350
Change-Id: I3783ca598aa289a0ece268b54cd21c52036b7de7
Reviewed-on: https://chromium-review.googlesource.com/c/1437177Reviewed-by: default avatarTheresa <twellington@chromium.org>
Commit-Queue: Matthew Jones <mdjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#626148}
parent 258c4aa6
......@@ -136,7 +136,7 @@ public class EditUrlSuggestionProcessor implements OnClickListener, SuggestionPr
public boolean doesProcessSuggestion(OmniboxSuggestion suggestion) {
Tab activeTab = mTabProvider != null ? mTabProvider.getActivityTab() : null;
if (OmniboxSuggestionType.URL_WHAT_YOU_TYPED != suggestion.getType() || activeTab == null
|| activeTab.isIncognito()) {
|| activeTab.isIncognito() || activeTab.isNativePage()) {
return false;
}
mLastProcessedSuggestion = 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