[M120 Migration]Fix for crash during chrome exit
[platform/framework/web/chromium-efl.git] / chrome / browser / browser_features.h
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.
4
5 // This file defines the browser-specific base::FeatureList features that are
6 // not shared with other process types.
7
8 #ifndef CHROME_BROWSER_BROWSER_FEATURES_H_
9 #define CHROME_BROWSER_BROWSER_FEATURES_H_
10
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"
15
16 namespace features {
17
18 // All features in alphabetical order. The features should be documented
19 // alongside the definition of their values in the .cc file.
20
21 BASE_DECLARE_FEATURE(kClosedTabCache);
22
23 BASE_DECLARE_FEATURE(kDestroyProfileOnBrowserClose);
24 BASE_DECLARE_FEATURE(kDestroySystemProfiles);
25
26 BASE_DECLARE_FEATURE(kDevToolsTabTarget);
27 BASE_DECLARE_FEATURE(kDevToolsVeLogging);
28
29 BASE_DECLARE_FEATURE(kNukeProfileBeforeCreateMultiAsync);
30
31 BASE_DECLARE_FEATURE(kPromoBrowserCommands);
32 extern const char kBrowserCommandIdParam[];
33
34 #if BUILDFLAG(IS_CHROMEOS_ASH)
35 BASE_DECLARE_FEATURE(kQuickSettingsPWANotifications);
36 #endif
37
38 #if BUILDFLAG(IS_CHROMEOS)
39 BASE_DECLARE_FEATURE(kDoubleTapToZoomInTabletMode);
40 #endif
41
42 #if !BUILDFLAG(IS_ANDROID)
43 BASE_DECLARE_FEATURE(kCopyLinkToText);
44 BASE_DECLARE_FEATURE(kMuteNotificationSnoozeAction);
45 #endif
46
47 BASE_DECLARE_FEATURE(kSandboxExternalProtocolBlocked);
48 BASE_DECLARE_FEATURE(kSandboxExternalProtocolBlockedWarning);
49 BASE_DECLARE_FEATURE(kTriggerNetworkDataMigration);
50
51 #if BUILDFLAG(IS_CHROMEOS)
52 BASE_DECLARE_FEATURE(kTabCaptureBlueBorderCrOS);
53 #endif
54
55 BASE_DECLARE_FEATURE(kWebUsbDeviceDetection);
56
57 BASE_DECLARE_FEATURE(kCertificateTransparencyAskBeforeEnabling);
58
59 BASE_DECLARE_FEATURE(kLargeFaviconFromGoogle);
60 extern const base::FeatureParam<int> kLargeFaviconFromGoogleSizeInDip;
61
62 BASE_DECLARE_FEATURE(kRestartNetworkServiceUnsandboxedForFailedLaunch);
63
64 BASE_DECLARE_FEATURE(kKeyPinningComponentUpdater);
65
66 #if BUILDFLAG(IS_WIN)
67 BASE_DECLARE_FEATURE(kAppBoundEncryptionMetrics);
68 BASE_DECLARE_FEATURE(kLockProfileCookieDatabase);
69 BASE_DECLARE_FEATURE(kNoPreReadMainDll);
70 #endif
71
72 BASE_DECLARE_FEATURE(kFlexOrgManagementDisclosure);
73
74 BASE_DECLARE_FEATURE(kFedCmWithoutThirdPartyCookies);
75
76 BASE_DECLARE_FEATURE(kIncomingCallNotifications);
77
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);
81
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);
85
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};
96
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
102 // the ownership.
103 enum class SearchPreloadShareableCacheType {
104   kEnabled,
105   kDisabled,
106 };
107
108 extern const base::FeatureParam<SearchPreloadShareableCacheType>
109     kSearchPreloadShareableCacheTypeParam;
110
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
115 // PreloadingConfig.
116 BASE_DECLARE_FEATURE(kPrerenderDSEHoldback);
117
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);
121
122 BASE_DECLARE_FEATURE(kOmniboxTriggerForNoStatePrefetch);
123
124 #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
125 BASE_DECLARE_FEATURE(kPayloadTestComponent);
126 #endif
127
128 }  // namespace features
129
130 #endif  // CHROME_BROWSER_BROWSER_FEATURES_H_