[omnibox] Make max-match type parameters subject to kNewSearchFeatures.
kNewSearchFeatures is a kill switch intended for a long-term holdback of
all search-related launches. See https://crrev.com/c/2132641 and
https://crrev.com/c/2161357 for earlier uses of this Feature.
Bug: 1073606
Change-Id: Ic9ea4394892496c43c6096b22d8236a031f4db6b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2202119
Commit-Queue: Justin Donnelly <[email protected]>
Reviewed-by: manuk hovanesian <[email protected]>
Cr-Commit-Position: refs/heads/master@{#769040}
diff --git a/components/omnibox/common/omnibox_features.cc b/components/omnibox/common/omnibox_features.cc
index 251b2eb..dacfbf7 100644
--- a/components/omnibox/common/omnibox_features.cc
+++ b/components/omnibox/common/omnibox_features.cc
@@ -217,26 +217,28 @@
const base::Feature kMaxZeroSuggestMatches{"OmniboxMaxZeroSuggestMatches",
base::FEATURE_DISABLED_BY_DEFAULT};
-// Feature used to cap the number of URL-type matches shown within the
-// Omnibox. If enabled, the number of URL-type matches is limited (unless
-// there are no more non-URL matches available.) If enabled, there is a
-// companion parameter - OmniboxMaxURLMatches - which specifies the maximum
-// desired number of URL-type matches.
-const base::Feature kOmniboxMaxURLMatches {
- "OmniboxMaxURLMatches",
-#if defined(OS_IOS) || defined(OS_ANDROID)
- base::FEATURE_DISABLED_BY_DEFAULT
-#else
- base::FEATURE_ENABLED_BY_DEFAULT
-#endif
-};
-
// Feature used to cap max suggestions shown according to the params
// UIMaxAutocompleteMatches and UIMaxAutocompleteMatchesByProvider.
const base::Feature kUIExperimentMaxAutocompleteMatches{
"OmniboxUIExperimentMaxAutocompleteMatches",
base::FEATURE_DISABLED_BY_DEFAULT};
+// Feature used to cap the number of URL-type matches shown within the
+// Omnibox. If enabled, the number of URL-type matches is limited (unless
+// there are no more non-URL matches available.) If enabled, there is a
+// companion parameter - OmniboxMaxURLMatches - which specifies the maximum
+// desired number of URL-type matches.
+const bool kOmniboxMaxURLMatchesEnabledByDefault =
+#if defined(OS_IOS) || defined(OS_ANDROID)
+ false;
+#else
+ true;
+#endif
+const base::Feature kOmniboxMaxURLMatches{
+ "OmniboxMaxURLMatches", kOmniboxMaxURLMatchesEnabledByDefault
+ ? base::FEATURE_ENABLED_BY_DEFAULT
+ : base::FEATURE_DISABLED_BY_DEFAULT};
+
// Feature that configures ZeroSuggestProvider using the "ZeroSuggestVariant"
// per-page-classification parameter.
//