[hub] Launch hub search to stable 100%
Roll out AndroidHubSearch to stable 100%. The chosen arm to launch will enabled the bookmarks, history and enter to search params. Bug: 398907040 Change-Id: I45b6b0fa1c1279f5c4f3a8cefd41404c299f4fbe Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6330826 Reviewed-by: Patrick Noland <pnoland@chromium.org> Reviewed-by: Brandon Wylie <wylieb@google.com> Commit-Queue: Brandon Fong <bjfong@google.com> Cr-Commit-Position: refs/heads/main@{#1429666}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
8803d47ae0
commit
48172ae3fe
components/omnibox
browser
common
testing/variations
@ -2230,29 +2230,11 @@ TEST_F(AutocompleteControllerTest,
|
|||||||
|
|
||||||
#if BUILDFLAG(IS_ANDROID)
|
#if BUILDFLAG(IS_ANDROID)
|
||||||
TEST_F(AutocompleteControllerTest, ShouldRunProvider_AndroidHubSearch) {
|
TEST_F(AutocompleteControllerTest, ShouldRunProvider_AndroidHubSearch) {
|
||||||
// For Lens searchboxes, run search provider only.
|
// Include bookmarks and history as default providers for hub search.
|
||||||
std::set<AutocompleteProvider::Type> expected_provider_types = {
|
std::set<AutocompleteProvider::Type> expected_provider_types = {
|
||||||
AutocompleteProvider::TYPE_SEARCH, AutocompleteProvider::TYPE_OPEN_TAB};
|
AutocompleteProvider::TYPE_SEARCH, AutocompleteProvider::TYPE_OPEN_TAB,
|
||||||
|
AutocompleteProvider::TYPE_BOOKMARK,
|
||||||
controller_.input_ =
|
AutocompleteProvider::TYPE_HISTORY_QUICK};
|
||||||
AutocompleteInput(u"a", 1u, metrics::OmniboxEventProto::ANDROID_HUB,
|
|
||||||
TestSchemeClassifier());
|
|
||||||
for (auto& provider : controller_.providers()) {
|
|
||||||
EXPECT_EQ(controller_.ShouldRunProvider(provider.get()),
|
|
||||||
expected_provider_types.contains(provider->type()))
|
|
||||||
<< "Provider Type: "
|
|
||||||
<< AutocompleteProvider::TypeToString(provider->type());
|
|
||||||
}
|
|
||||||
|
|
||||||
base::test::ScopedFeatureList scoped_feature_list;
|
|
||||||
scoped_feature_list.InitAndEnableFeatureWithParameters(
|
|
||||||
omnibox::kAndroidHubSearch, {{"enable_bookmark_provider", "true"},
|
|
||||||
{"enable_history_provider", "true"}});
|
|
||||||
|
|
||||||
expected_provider_types = {AutocompleteProvider::TYPE_SEARCH,
|
|
||||||
AutocompleteProvider::TYPE_OPEN_TAB,
|
|
||||||
AutocompleteProvider::TYPE_BOOKMARK,
|
|
||||||
AutocompleteProvider::TYPE_HISTORY_QUICK};
|
|
||||||
|
|
||||||
controller_.input_ =
|
controller_.input_ =
|
||||||
AutocompleteInput(u"a", 1u, metrics::OmniboxEventProto::ANDROID_HUB,
|
AutocompleteInput(u"a", 1u, metrics::OmniboxEventProto::ANDROID_HUB,
|
||||||
|
@ -762,10 +762,10 @@ bool IsStarterPackPageEnabled();
|
|||||||
// primitives are included.
|
// primitives are included.
|
||||||
#if BUILDFLAG(IS_ANDROID)
|
#if BUILDFLAG(IS_ANDROID)
|
||||||
constexpr base::FeatureParam<bool> kAndroidHubSearchEnableBookmarkProvider{
|
constexpr base::FeatureParam<bool> kAndroidHubSearchEnableBookmarkProvider{
|
||||||
&omnibox::kAndroidHubSearch, "enable_bookmark_provider", false};
|
&omnibox::kAndroidHubSearch, "enable_bookmark_provider", true};
|
||||||
|
|
||||||
constexpr base::FeatureParam<bool> kAndroidHubSearchEnableHistoryProvider{
|
constexpr base::FeatureParam<bool> kAndroidHubSearchEnableHistoryProvider{
|
||||||
&omnibox::kAndroidHubSearch, "enable_history_provider", false};
|
&omnibox::kAndroidHubSearch, "enable_history_provider", true};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// <- Android Hub Search
|
// <- Android Hub Search
|
||||||
|
@ -114,7 +114,7 @@ public class OmniboxFeatures {
|
|||||||
newFlag(OmniboxFeatureList.RETAIN_OMNIBOX_ON_FOCUS, FeatureState.ENABLED_IN_TEST);
|
newFlag(OmniboxFeatureList.RETAIN_OMNIBOX_ON_FOCUS, FeatureState.ENABLED_IN_TEST);
|
||||||
|
|
||||||
public static final CachedFlag sAndroidHubSearch =
|
public static final CachedFlag sAndroidHubSearch =
|
||||||
newFlag(OmniboxFeatureList.ANDROID_HUB_SEARCH, FeatureState.ENABLED_IN_TEST);
|
newFlag(OmniboxFeatureList.ANDROID_HUB_SEARCH, FeatureState.ENABLED_IN_PROD);
|
||||||
|
|
||||||
public static final CachedFlag sPostDelayedTaskFocusTab =
|
public static final CachedFlag sPostDelayedTaskFocusTab =
|
||||||
newFlag(OmniboxFeatureList.POST_DELAYED_TASK_FOCUS_TAB, FeatureState.ENABLED_IN_PROD);
|
newFlag(OmniboxFeatureList.POST_DELAYED_TASK_FOCUS_TAB, FeatureState.ENABLED_IN_PROD);
|
||||||
@ -178,7 +178,7 @@ public class OmniboxFeatures {
|
|||||||
// This parameter allows the user to click enter when on hub search to perform a search on the
|
// This parameter allows the user to click enter when on hub search to perform a search on the
|
||||||
// listed suggestions or perform a google search on the query if no suggestions are found.
|
// listed suggestions or perform a google search on the query if no suggestions are found.
|
||||||
public static final BooleanCachedFeatureParam sAndroidHubSearchEnterPerformsSearch =
|
public static final BooleanCachedFeatureParam sAndroidHubSearchEnterPerformsSearch =
|
||||||
newBooleanParam(sAndroidHubSearch, "enable_press_enter_to_search", false);
|
newBooleanParam(sAndroidHubSearch, "enable_press_enter_to_search", true);
|
||||||
|
|
||||||
// Omnibox Diagnostics
|
// Omnibox Diagnostics
|
||||||
private static final CachedFlag sDiagnostics =
|
private static final CachedFlag sDiagnostics =
|
||||||
|
@ -372,9 +372,7 @@ BASE_FEATURE(kSuppressIntermediateACUpdatesOnLowEndDevices,
|
|||||||
DISABLED);
|
DISABLED);
|
||||||
|
|
||||||
// (Android only) Show the search feature in the hub.
|
// (Android only) Show the search feature in the hub.
|
||||||
BASE_FEATURE(kAndroidHubSearch,
|
BASE_FEATURE(kAndroidHubSearch, "AndroidHubSearch", ENABLED);
|
||||||
"AndroidHubSearch",
|
|
||||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
|
||||||
|
|
||||||
// When enabled, delay focusTab to prioritize navigation
|
// When enabled, delay focusTab to prioritize navigation
|
||||||
// (https://crbug.com/374852568).
|
// (https://crbug.com/374852568).
|
||||||
|
@ -503,26 +503,6 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"AndroidHubSearch": [
|
|
||||||
{
|
|
||||||
"platforms": [
|
|
||||||
"android"
|
|
||||||
],
|
|
||||||
"experiments": [
|
|
||||||
{
|
|
||||||
"name": "Enabled",
|
|
||||||
"params": {
|
|
||||||
"enable_bookmark_provider": "true",
|
|
||||||
"enable_history_provider": "true",
|
|
||||||
"enable_press_enter_to_search": "true"
|
|
||||||
},
|
|
||||||
"enable_features": [
|
|
||||||
"AndroidHubSearch"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"AndroidLowLatencyCanvas": [
|
"AndroidLowLatencyCanvas": [
|
||||||
{
|
{
|
||||||
"platforms": [
|
"platforms": [
|
||||||
|
Reference in New Issue
Block a user