1 // Copyright 2018 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // This file defines the browser-specific base::FeatureList features that are
6 // not shared with other process types.
8 #ifndef CHROME_BROWSER_BROWSER_FEATURES_H_
9 #define CHROME_BROWSER_BROWSER_FEATURES_H_
11 #include "base/feature_list.h"
12 #include "base/metrics/field_trial_params.h"
13 #include "build/build_config.h"
14 #include "build/chromeos_buildflags.h"
18 // All features in alphabetical order. The features should be documented
19 // alongside the definition of their values in the .cc file.
21 BASE_DECLARE_FEATURE(kClosedTabCache);
23 BASE_DECLARE_FEATURE(kDestroyProfileOnBrowserClose);
24 BASE_DECLARE_FEATURE(kDestroySystemProfiles);
26 BASE_DECLARE_FEATURE(kDevToolsTabTarget);
27 BASE_DECLARE_FEATURE(kDevToolsVeLogging);
29 BASE_DECLARE_FEATURE(kNukeProfileBeforeCreateMultiAsync);
31 BASE_DECLARE_FEATURE(kPromoBrowserCommands);
32 extern const char kBrowserCommandIdParam[];
34 #if BUILDFLAG(IS_CHROMEOS_ASH)
35 BASE_DECLARE_FEATURE(kQuickSettingsPWANotifications);
38 #if BUILDFLAG(IS_CHROMEOS)
39 BASE_DECLARE_FEATURE(kDoubleTapToZoomInTabletMode);
42 #if !BUILDFLAG(IS_ANDROID)
43 BASE_DECLARE_FEATURE(kCopyLinkToText);
44 BASE_DECLARE_FEATURE(kMuteNotificationSnoozeAction);
47 BASE_DECLARE_FEATURE(kSandboxExternalProtocolBlocked);
48 BASE_DECLARE_FEATURE(kSandboxExternalProtocolBlockedWarning);
49 BASE_DECLARE_FEATURE(kTriggerNetworkDataMigration);
51 #if BUILDFLAG(IS_CHROMEOS)
52 BASE_DECLARE_FEATURE(kTabCaptureBlueBorderCrOS);
55 BASE_DECLARE_FEATURE(kWebUsbDeviceDetection);
57 BASE_DECLARE_FEATURE(kCertificateTransparencyAskBeforeEnabling);
59 BASE_DECLARE_FEATURE(kLargeFaviconFromGoogle);
60 extern const base::FeatureParam<int> kLargeFaviconFromGoogleSizeInDip;
62 BASE_DECLARE_FEATURE(kRestartNetworkServiceUnsandboxedForFailedLaunch);
64 BASE_DECLARE_FEATURE(kKeyPinningComponentUpdater);
67 BASE_DECLARE_FEATURE(kAppBoundEncryptionMetrics);
68 BASE_DECLARE_FEATURE(kLockProfileCookieDatabase);
69 BASE_DECLARE_FEATURE(kNoPreReadMainDll);
72 BASE_DECLARE_FEATURE(kFlexOrgManagementDisclosure);
74 BASE_DECLARE_FEATURE(kFedCmWithoutThirdPartyCookies);
76 BASE_DECLARE_FEATURE(kIncomingCallNotifications);
78 // This flag is used for enabling Omnibox triggered prerendering. See
79 // crbug.com/1166085 for more details of Omnibox triggered prerendering.
80 BASE_DECLARE_FEATURE(kOmniboxTriggerForPrerender2);
82 // This flag is used for enabling Bookmark triggered prerendering. See
83 // crbug.com/1422819 for more details of Bookmark triggered prerendering.
84 BASE_DECLARE_FEATURE(kBookmarkTriggerForPrerender2);
86 // This flag is used for enabling New Tab Page triggered prerendering. See
87 // crbug.com/1462832 for more details of New Tab Page triggered prerendering.
88 BASE_DECLARE_FEATURE(kNewTabPageTriggerForPrerender2);
89 // This parameter is used to set a time threshold for triggering onMouseHover
90 // prerender. For example, if the value is 300, the New Tab Page prerender
91 // will start after 300ms after mouseHover duration is over 300ms.
92 const base::FeatureParam<int>
93 kNewTabPagePrerenderStartDelayOnMouseHoverByMiliSeconds{
94 &features::kNewTabPageTriggerForPrerender2,
95 "prerender_start_delay_on_mouse_hover_ms", 300};
97 // This flag controls whether to trigger prerendering when the default search
98 // engine suggests to prerender a search result.
99 BASE_DECLARE_FEATURE(kSupportSearchSuggestionForPrerender2);
100 // Indicates whether to make search prefetch response shareable to prerender.
101 // When allowing this, prerender can only copy the cache but cannot take over
103 enum class SearchPreloadShareableCacheType {
108 extern const base::FeatureParam<SearchPreloadShareableCacheType>
109 kSearchPreloadShareableCacheTypeParam;
111 // Disables prerendering on the default search engine predictor. This is useful
112 // in comparing the impact of the SupportSearchSuggestionForPrerender2 feature
113 // during its rollout. Once that rollout is complete, this feature should be
114 // removed and instead we should add a new long-term holdback to
116 BASE_DECLARE_FEATURE(kPrerenderDSEHoldback);
118 // This is used to enable an experiment for modifying confidence cutoff of
119 // prerender and preconnect for autocomplete action predictor.
120 BASE_DECLARE_FEATURE(kAutocompleteActionPredictorConfidenceCutoff);
122 BASE_DECLARE_FEATURE(kOmniboxTriggerForNoStatePrefetch);
124 #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
125 BASE_DECLARE_FEATURE(kPayloadTestComponent);
128 } // namespace features
130 #endif // CHROME_BROWSER_BROWSER_FEATURES_H_