[omnibox] Enables zero-prefix suggestions in Desktop NTP by default
- Enables zero-prefix suggestion in Desktop NTP (Omnibox and Realbox)
and modifies the tests according to the new expectation.
- Removes already enabled features and related fieldtrial params from
fieldtrial_testing_config.json
Bug: 1075724
Change-Id: I7e63dc5d6532fe8baf83fe358f47c00fa61729d0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2175138
Commit-Queue: Moe Ahmadi <[email protected]>
Reviewed-by: Justin Donnelly <[email protected]>
Reviewed-by: Mark Pearson <[email protected]>
Reviewed-by: Tommy Li <[email protected]>
Cr-Commit-Position: refs/heads/master@{#797904}
diff --git a/components/omnibox/browser/zero_suggest_provider.cc b/components/omnibox/browser/zero_suggest_provider.cc
index 27e91c3..1f0ac85 100644
--- a/components/omnibox/browser/zero_suggest_provider.cc
+++ b/components/omnibox/browser/zero_suggest_provider.cc
@@ -752,18 +752,15 @@
if (base::Contains(field_trial_variants, kMostVisitedVariant))
return MOST_VISITED;
-#if defined(OS_ANDROID)
- // For Android NTP, default to REMOTE_NO_URL, if it's allowed.
+#if !defined(OS_IOS)
+ // For Desktop and Android, default to REMOTE_NO_URL on the NTP, if allowed.
if (IsNTPPage(current_page_classification_) && remote_no_url_allowed)
return REMOTE_NO_URL;
#endif
#if defined(OS_ANDROID) || defined(OS_IOS)
- // Then, for Android and iOS, default to MOST_VISITED except on the SERP.
- if (current_page_classification_ !=
- OmniboxEventProto::SEARCH_RESULT_PAGE_NO_SEARCH_TERM_REPLACEMENT &&
- current_page_classification_ !=
- OmniboxEventProto::SEARCH_RESULT_PAGE_DOING_SEARCH_TERM_REPLACEMENT) {
+ // For Android and iOS, default to MOST_VISITED everywhere except on the SERP.
+ if (!IsSearchResultsPage(current_page_classification_)) {
return MOST_VISITED;
}
#endif