Commit 87f15940 authored by Filip Gorski's avatar Filip Gorski Committed by Commit Bot

[Omnibox] Cleaning up the formatting of omnibox_features.cc

Change-Id: I81effcfed2342a4a5eaddcbefb4a4581ecc744ea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2363167Reviewed-by: default avatarJustin Donnelly <jdonnelly@chromium.org>
Commit-Queue: Filip Gorski <fgorski@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799312}
parent 565f39bb
...@@ -10,11 +10,38 @@ namespace omnibox { ...@@ -10,11 +10,38 @@ namespace omnibox {
const auto enabled_by_default_desktop_only = const auto enabled_by_default_desktop_only =
#if defined(OS_ANDROID) || defined(OS_IOS) #if defined(OS_ANDROID) || defined(OS_IOS)
base::FEATURE_DISABLED_BY_DEFAULT base::FEATURE_DISABLED_BY_DEFAULT;
#else #else
base::FEATURE_ENABLED_BY_DEFAULT base::FEATURE_ENABLED_BY_DEFAULT;
#endif
const auto enabled_by_default_android_only =
#if defined(OS_ANDROID)
base::FEATURE_ENABLED_BY_DEFAULT;
#else
base::FEATURE_DISABLED_BY_DEFAULT;
#endif
const auto enabled_by_default_ios_only =
#if defined(OS_IOS)
base::FEATURE_ENABLED_BY_DEFAULT;
#else
base::FEATURE_DISABLED_BY_DEFAULT;
#endif
const auto enabled_by_default_desktop_android =
#if defined(OS_IOS)
base::FEATURE_DISABLED_BY_DEFAULT;
#else
base::FEATURE_ENABLED_BY_DEFAULT;
#endif
const auto enabled_by_default_desktop_ios =
#if defined(OS_ANDROID)
base::FEATURE_DISABLED_BY_DEFAULT;
#else
base::FEATURE_ENABLED_BY_DEFAULT;
#endif #endif
;
// Allows Omnibox to dynamically adjust number of offered suggestions to fill in // Allows Omnibox to dynamically adjust number of offered suggestions to fill in
// the space between Omnibox an the soft keyboard. The number of suggestions // the space between Omnibox an the soft keyboard. The number of suggestions
...@@ -46,20 +73,14 @@ const base::Feature kOmniboxShortBookmarkSuggestions{ ...@@ -46,20 +73,14 @@ const base::Feature kOmniboxShortBookmarkSuggestions{
// Feature used to force on the experiment of transmission of tail suggestions // Feature used to force on the experiment of transmission of tail suggestions
// from GWS to this client, currently testing for desktop. // from GWS to this client, currently testing for desktop.
const base::Feature kOmniboxTailSuggestions{ const base::Feature kOmniboxTailSuggestions{"OmniboxTailSuggestions",
"OmniboxTailSuggestions", base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_DISABLED_BY_DEFAULT};
// Feature that enables the tab-switch suggestions corresponding to an open // Feature that enables the tab-switch suggestions corresponding to an open
// tab, for a button or dedicated suggestion. Enabled by default on Desktop // tab, for a button or dedicated suggestion. Enabled by default on Desktop
// and iOS. // and iOS.
const base::Feature kOmniboxTabSwitchSuggestions{ const base::Feature kOmniboxTabSwitchSuggestions{
"OmniboxTabSwitchSuggestions", "OmniboxTabSwitchSuggestions", enabled_by_default_desktop_ios};
#if defined(OS_ANDROID)
base::FEATURE_DISABLED_BY_DEFAULT
#else
base::FEATURE_ENABLED_BY_DEFAULT
#endif
};
// Feature used to enable various experiments on keyword mode, UI and // Feature used to enable various experiments on keyword mode, UI and
// suggestions. // suggestions.
...@@ -68,13 +89,8 @@ const base::Feature kExperimentalKeywordMode{"OmniboxExperimentalKeywordMode", ...@@ -68,13 +89,8 @@ const base::Feature kExperimentalKeywordMode{"OmniboxExperimentalKeywordMode",
// Feature to enable clipboard provider to suggest searching for copied images. // Feature to enable clipboard provider to suggest searching for copied images.
const base::Feature kEnableClipboardProviderImageSuggestions{ const base::Feature kEnableClipboardProviderImageSuggestions{
"OmniboxEnableClipboardProviderImageSuggestions", "OmniboxEnableClipboardProviderImageSuggestions",
#if defined(OS_IOS) enabled_by_default_ios_only};
base::FEATURE_ENABLED_BY_DEFAULT
#else
base::FEATURE_DISABLED_BY_DEFAULT
#endif
};
// Feature to enable the search provider to send a request to the suggest // Feature to enable the search provider to send a request to the suggest
// server on focus. This allows the suggest server to warm up, by, for // server on focus. This allows the suggest server to warm up, by, for
...@@ -82,41 +98,22 @@ const base::Feature kEnableClipboardProviderImageSuggestions{ ...@@ -82,41 +98,22 @@ const base::Feature kEnableClipboardProviderImageSuggestions{
// in memory allows the suggest server to respond more quickly with // in memory allows the suggest server to respond more quickly with
// personalized suggestions as the user types. // personalized suggestions as the user types.
const base::Feature kSearchProviderWarmUpOnFocus{ const base::Feature kSearchProviderWarmUpOnFocus{
"OmniboxWarmUpSearchProviderOnFocus", "OmniboxWarmUpSearchProviderOnFocus", enabled_by_default_desktop_android};
#if defined(OS_IOS)
base::FEATURE_DISABLED_BY_DEFAULT
#else
base::FEATURE_ENABLED_BY_DEFAULT
#endif
};
// Feature used to display the title of the current URL match. // Feature used to display the title of the current URL match.
const base::Feature kDisplayTitleForCurrentUrl{ const base::Feature kDisplayTitleForCurrentUrl{
"OmniboxDisplayTitleForCurrentUrl", "OmniboxDisplayTitleForCurrentUrl", enabled_by_default_desktop_android};
#if !defined(OS_IOS)
base::FEATURE_ENABLED_BY_DEFAULT
#else
base::FEATURE_DISABLED_BY_DEFAULT
#endif
};
// Feature used to always swap the title and URL. // Feature used to always swap the title and URL.
const base::Feature kUIExperimentSwapTitleAndUrl{ const base::Feature kUIExperimentSwapTitleAndUrl{
"OmniboxUIExperimentSwapTitleAndUrl", "OmniboxUIExperimentSwapTitleAndUrl", enabled_by_default_desktop_only};
#if defined(OS_IOS) || defined(OS_ANDROID)
base::FEATURE_DISABLED_BY_DEFAULT
#else
base::FEATURE_ENABLED_BY_DEFAULT
#endif
};
// Feature used to enable speculatively starting a service worker associated // Feature used to enable speculatively starting a service worker associated
// with the destination of the default match when the user's input looks like a // with the destination of the default match when the user's input looks like a
// query. // query.
const base::Feature kSpeculativeServiceWorkerStartOnQueryInput{ const base::Feature kSpeculativeServiceWorkerStartOnQueryInput{
"OmniboxSpeculativeServiceWorkerStartOnQueryInput", "OmniboxSpeculativeServiceWorkerStartOnQueryInput",
base::FEATURE_ENABLED_BY_DEFAULT base::FEATURE_ENABLED_BY_DEFAULT};
};
// Feature used to fetch document suggestions. // Feature used to fetch document suggestions.
const base::Feature kDocumentProvider{"OmniboxDocumentProvider", const base::Feature kDocumentProvider{"OmniboxDocumentProvider",
...@@ -130,13 +127,7 @@ const base::Feature kAutocompleteTitles{"OmniboxAutocompleteTitles", ...@@ -130,13 +127,7 @@ const base::Feature kAutocompleteTitles{"OmniboxAutocompleteTitles",
// Returns whether IsInstantExtendedAPIEnabled should be ignored when deciding // Returns whether IsInstantExtendedAPIEnabled should be ignored when deciding
// the number of Google-provided search suggestions. // the number of Google-provided search suggestions.
const base::Feature kOmniboxDisableInstantExtendedLimit{ const base::Feature kOmniboxDisableInstantExtendedLimit{
"OmniboxDisableInstantExtendedLimit", "OmniboxDisableInstantExtendedLimit", enabled_by_default_android_only};
#if defined(OS_ANDROID)
base::FEATURE_ENABLED_BY_DEFAULT
#else
base::FEATURE_DISABLED_BY_DEFAULT
#endif
};
// Show the search engine logo in the omnibox on Android (desktop already does // Show the search engine logo in the omnibox on Android (desktop already does
// this). // this).
...@@ -145,13 +136,7 @@ const base::Feature kOmniboxSearchEngineLogo{"OmniboxSearchEngineLogo", ...@@ -145,13 +136,7 @@ const base::Feature kOmniboxSearchEngineLogo{"OmniboxSearchEngineLogo",
// Feature used to allow users to remove suggestions from clipboard. // Feature used to allow users to remove suggestions from clipboard.
const base::Feature kOmniboxRemoveSuggestionsFromClipboard{ const base::Feature kOmniboxRemoveSuggestionsFromClipboard{
"OmniboxRemoveSuggestionsFromClipboard", "OmniboxRemoveSuggestionsFromClipboard", enabled_by_default_android_only};
#if defined(OS_ANDROID)
base::FEATURE_ENABLED_BY_DEFAULT
#else
base::FEATURE_DISABLED_BY_DEFAULT
#endif
};
// Feature to debounce drive requests from the document provider. // Feature to debounce drive requests from the document provider.
const base::Feature kDebounceDocumentProvider{ const base::Feature kDebounceDocumentProvider{
......
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