File: browser_features.h

package info (click to toggle)
chromium 120.0.6099.224-1~deb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 6,112,112 kB
  • sloc: cpp: 32,907,025; ansic: 8,148,123; javascript: 3,679,536; python: 2,031,248; asm: 959,718; java: 804,675; xml: 617,256; sh: 111,417; objc: 100,835; perl: 88,443; cs: 53,032; makefile: 29,579; fortran: 24,137; php: 21,162; tcl: 21,147; sql: 20,809; ruby: 17,735; pascal: 12,864; yacc: 8,045; lisp: 3,388; lex: 1,323; ada: 727; awk: 329; jsp: 267; csh: 117; exp: 43; sed: 37
file content (130 lines) | stat: -rw-r--r-- 4,670 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// This file defines the browser-specific base::FeatureList features that are
// not shared with other process types.

#ifndef CHROME_BROWSER_BROWSER_FEATURES_H_
#define CHROME_BROWSER_BROWSER_FEATURES_H_

#include "base/feature_list.h"
#include "base/metrics/field_trial_params.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"

namespace features {

// All features in alphabetical order. The features should be documented
// alongside the definition of their values in the .cc file.

BASE_DECLARE_FEATURE(kClosedTabCache);

BASE_DECLARE_FEATURE(kDestroyProfileOnBrowserClose);
BASE_DECLARE_FEATURE(kDestroySystemProfiles);

BASE_DECLARE_FEATURE(kDevToolsTabTarget);
BASE_DECLARE_FEATURE(kDevToolsVeLogging);

BASE_DECLARE_FEATURE(kNukeProfileBeforeCreateMultiAsync);

BASE_DECLARE_FEATURE(kPromoBrowserCommands);
extern const char kBrowserCommandIdParam[];

#if BUILDFLAG(IS_CHROMEOS_ASH)
BASE_DECLARE_FEATURE(kQuickSettingsPWANotifications);
#endif

#if BUILDFLAG(IS_CHROMEOS)
BASE_DECLARE_FEATURE(kDoubleTapToZoomInTabletMode);
#endif

#if !BUILDFLAG(IS_ANDROID)
BASE_DECLARE_FEATURE(kCopyLinkToText);
BASE_DECLARE_FEATURE(kMuteNotificationSnoozeAction);
#endif

BASE_DECLARE_FEATURE(kSandboxExternalProtocolBlocked);
BASE_DECLARE_FEATURE(kSandboxExternalProtocolBlockedWarning);
BASE_DECLARE_FEATURE(kTriggerNetworkDataMigration);

#if BUILDFLAG(IS_CHROMEOS)
BASE_DECLARE_FEATURE(kTabCaptureBlueBorderCrOS);
#endif

BASE_DECLARE_FEATURE(kWebUsbDeviceDetection);

BASE_DECLARE_FEATURE(kCertificateTransparencyAskBeforeEnabling);

BASE_DECLARE_FEATURE(kLargeFaviconFromGoogle);
extern const base::FeatureParam<int> kLargeFaviconFromGoogleSizeInDip;

BASE_DECLARE_FEATURE(kRestartNetworkServiceUnsandboxedForFailedLaunch);

BASE_DECLARE_FEATURE(kKeyPinningComponentUpdater);

#if BUILDFLAG(IS_WIN)
BASE_DECLARE_FEATURE(kAppBoundEncryptionMetrics);
BASE_DECLARE_FEATURE(kLockProfileCookieDatabase);
BASE_DECLARE_FEATURE(kNoPreReadMainDll);
#endif

BASE_DECLARE_FEATURE(kFlexOrgManagementDisclosure);

BASE_DECLARE_FEATURE(kFedCmWithoutThirdPartyCookies);

BASE_DECLARE_FEATURE(kIncomingCallNotifications);

// This flag is used for enabling Omnibox triggered prerendering. See
// crbug.com/1166085 for more details of Omnibox triggered prerendering.
BASE_DECLARE_FEATURE(kOmniboxTriggerForPrerender2);

// This flag is used for enabling Bookmark triggered prerendering. See
// crbug.com/1422819 for more details of Bookmark triggered prerendering.
BASE_DECLARE_FEATURE(kBookmarkTriggerForPrerender2);

// This flag is used for enabling New Tab Page triggered prerendering. See
// crbug.com/1462832 for more details of New Tab Page triggered prerendering.
BASE_DECLARE_FEATURE(kNewTabPageTriggerForPrerender2);
// This parameter is used to set a time threshold for triggering onMouseHover
// prerender. For example, if the value is 300, the New Tab Page prerender
// will start after 300ms after mouseHover duration is over 300ms.
const base::FeatureParam<int>
    kNewTabPagePrerenderStartDelayOnMouseHoverByMiliSeconds{
        &features::kNewTabPageTriggerForPrerender2,
        "prerender_start_delay_on_mouse_hover_ms", 300};

// This flag controls whether to trigger prerendering when the default search
// engine suggests to prerender a search result.
BASE_DECLARE_FEATURE(kSupportSearchSuggestionForPrerender2);
// Indicates whether to make search prefetch response shareable to prerender.
// When allowing this, prerender can only copy the cache but cannot take over
// the ownership.
enum class SearchPreloadShareableCacheType {
  kEnabled,
  kDisabled,
};

extern const base::FeatureParam<SearchPreloadShareableCacheType>
    kSearchPreloadShareableCacheTypeParam;

// Disables prerendering on the default search engine predictor. This is useful
// in comparing the impact of the SupportSearchSuggestionForPrerender2 feature
// during its rollout. Once that rollout is complete, this feature should be
// removed and instead we should add a new long-term holdback to
// PreloadingConfig.
BASE_DECLARE_FEATURE(kPrerenderDSEHoldback);

// This is used to enable an experiment for modifying confidence cutoff of
// prerender and preconnect for autocomplete action predictor.
BASE_DECLARE_FEATURE(kAutocompleteActionPredictorConfidenceCutoff);

BASE_DECLARE_FEATURE(kOmniboxTriggerForNoStatePrefetch);

#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
BASE_DECLARE_FEATURE(kPayloadTestComponent);
#endif

}  // namespace features

#endif  // CHROME_BROWSER_BROWSER_FEATURES_H_