File: switches.h

package info (click to toggle)
chromium 139.0.7258.127-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 6,122,068 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (131 lines) | stat: -rw-r--r-- 5,088 bytes parent folder | download | duplicates (3)
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
131
// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef EXTENSIONS_COMMON_SWITCHES_H_
#define EXTENSIONS_COMMON_SWITCHES_H_

#include "build/build_config.h"

namespace extensions::switches {

// Allows non-https URL for background_page for hosted apps.
extern const char kAllowHTTPBackgroundPage[];

// Allows the browser to load extensions that lack a modern manifest when that
// would otherwise be forbidden.
extern const char kAllowLegacyExtensionManifests[];

// Adds the given extension ID to all the permission allowlists.
extern const char kAllowlistedExtensionID[];

// Whether to disable app content verification when testing changes locally on
// Chromebox for Meetings hardware.
extern const char kDisableAppContentVerification[];

// Disable checking for user opt-in for extensions that want to inject script
// into file URLs (ie, always allow it). This is used during automated testing.
extern const char kDisableExtensionsFileAccessCheck[];

// Disables extensions.
inline constexpr char kDisableExtensions[] = "disable-extensions";

// Disable extensions except those specified in a comma-separated list.
inline constexpr char kDisableExtensionsExcept[] = "disable-extensions-except";

// Disable the net::URLRequestThrottlerManager functionality for
// requests originating from extensions.
extern const char kDisableExtensionsHttpThrottling[];

// Enables extension options to be embedded in chrome://extensions rather than
// a new tab.
extern const char kEmbeddedExtensionOptions[];

// Enables extension APIs that are in development.
extern const char kEnableExperimentalExtensionApis[];

// Enable BLE Advertising in apps.
extern const char kEnableBLEAdvertising[];

// Marks a renderer as extension process.
extern const char kExtensionProcess[];

// Enables extensions running scripts on chrome:// URLs.
// Extensions still need to explicitly request access to chrome:// URLs in the
// manifest.
extern const char kExtensionsOnChromeURLs[];

// Enables extensions running scripts on chrome-extension:// URLs.
// Extensions still need to explicitly request access to chrome-extension://
// URLs in the manifest.
extern const char kExtensionsOnExtensionURLs[];

// Comma-separated list of paths to apps to load at startup. The first app in
// the list will be launched.
extern const char kLoadApps[];

// Comma-separated list of paths to extensions to load at startup.
extern const char kLoadExtension[];

#if BUILDFLAG(IS_CHROMEOS)
// Path to the unpacked test extension to load into the signin profile. The ID
// extension loaded must match kTestSigninProfileExtensionId.
extern const char kLoadSigninProfileTestExtension[];

// Path to the unpacked test extension to load into guest mode. The extension ID
// must match kGuestModeTestExtensionId.
extern const char kLoadGuestModeTestExtension[];
#endif

// Allows the use of the `testing` reason in offscreen documents.
extern const char kOffscreenDocumentTesting[];

// Set the parameters for ExtensionURLLoaderThrottleBrowserTest.
extern const char kSetExtensionThrottleTestParams[];

// Makes component extensions appear in chrome://settings/extensions.
extern const char kShowComponentExtensionOptions[];

// Pass launch source to platform apps.
extern const char kTraceAppSource[];

// Enable package hash check: the .crx file sha256 hash sum should be equal to
// the one received from update manifest.
extern const char kEnableCrxHashCheck[];

// Mute extension errors while working with new manifest version.
extern const char kAllowFutureManifestVersion[];

// Allow the chrome.test API to be exposed on web page contexts for testing.
// TODO(tjudkins): This will need to be added to the list of flags that get
// copied from the browser to the renderer in ChromeContentBrowserClient to
// actually use it in browser tests.
extern const char kExtensionTestApiOnWebPages[];

// The feature parameter name that controls the variant of IPH shown when the
// user has no extensions installed.
extern const char kZeroStatePromoIphVariantParamName[];

// When the user has no extensions installed, display a custom action IPH
// that upon triggering, opens a new tab to the Chrome Web Store.
extern const char kZeroStatePromoCustomActionIph[];

// When the user has no extensions installed, display a custom UI IPH that
// presents the user with different collections of extensions to explore,
// each in a cr-chip button.
extern const char kZeroStatePromoCustomUiChipIph[];

// When the user has no extensions installed, display a custom UI IPH that
// presents the user with different collections of extensions to explore,
// each in a plain text link.
extern const char kZeroStatePromoCustomUiPlainLinkIph[];

// Checks if extensions are allowed to run on chrome:// URLs.
bool AreExtensionsOnChromeURLsAllowed();

// Checks if extensions are allowed to run on chrome-extension:// URLs.
bool AreExtensionsOnExtensionURLsAllowed();

}  // namespace extensions::switches

#endif  // EXTENSIONS_COMMON_SWITCHES_H_