blob: 9aeeed57cf04e93cfecc32dfcc36b13dd00e3d36 [file] [log] [blame]
[email protected]6d8a0b092013-06-12 20:54:131// Copyright 2013 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef EXTENSIONS_BROWSER_PREF_NAMES_H_
6#define EXTENSIONS_BROWSER_PREF_NAMES_H_
7
8#include <string>
9
10#include "extensions/browser/extension_prefs_scope.h"
11
[email protected]6d8a0b092013-06-12 20:54:1312// Preference keys which are needed by both the ExtensionPrefs and by external
13// clients, such as APIs.
[email protected]234fc5ff2014-01-16 23:32:2814
15namespace extensions {
[email protected]6d8a0b092013-06-12 20:54:1316namespace pref_names {
17
18// If the given |scope| is persisted, return true and populate |result| with the
[email protected]234fc5ff2014-01-16 23:32:2819// appropriate property (i.e. one of kPref*) within a kExtensions dictionary. If
20// |scope| is not persisted, return false, and leave |result| unchanged.
[email protected]6d8a0b092013-06-12 20:54:1321bool ScopeToPrefName(ExtensionPrefsScope scope, std::string* result);
22
[email protected]234fc5ff2014-01-16 23:32:2823// Browser-level preferences ---------------------------------------------------
24
25// Whether we have run the extension-alert system (see ExtensionGlobalError)
26// at least once for this profile.
27extern const char kAlertsInitialized[];
28
29// The sites that are allowed to install extensions. These sites should be
30// allowed to install extensions without the scary dangerous downloads bar.
31// Also, when off-store-extension installs are disabled, these sites are exempt.
32extern const char kAllowedInstallSites[];
33
34// A list of allowed extension types. Extensions can only be installed if their
35// type is on this whitelist or alternatively on kInstallAllowList or
36// kInstallForceList.
37extern const char kAllowedTypes[];
38
hashimoto2d1cf1662014-08-25 11:08:2039// A boolean that tracks whether apps are allowed to enter fullscreen mode.
40extern const char kAppFullscreenAllowed[];
41
[email protected]234fc5ff2014-01-16 23:32:2842// Dictionary pref that keeps track of per-extension settings. The keys are
43// extension ids.
44extern const char kExtensions[];
45
binjinb2454382014-09-22 15:17:4346// Dictionary pref that manages extensions, controlled by policy.
47// Values are expected to conform to the schema of the ExtensionManagement
48// policy.
49extern const char kExtensionManagement[];
50
Joshua Pawlickifd01b7c2019-01-17 16:18:3451// Policy that indicates whether CRX2 extension updates are allowed.
52extern const char kInsecureExtensionUpdatesEnabled[];
53
[email protected]234fc5ff2014-01-16 23:32:2854// A whitelist of extension ids the user can install: exceptions from the
55// following blacklist.
56extern const char kInstallAllowList[];
57
58// A blacklist, containing extensions the user cannot install. This list can
59// contain "*" meaning all extensions. This list should not be confused with the
60// extension blacklist, which is Google controlled.
61extern const char kInstallDenyList[];
62
63// A list containing extensions that Chrome will silently install
64// at startup time. It is a list of strings, each string contains
65// an extension ID and an update URL, delimited by a semicolon.
66// This preference is set by an admin policy, and meant to be only
67// accessed through extensions::ExternalPolicyProvider.
68extern const char kInstallForceList[];
69
Alexander Hendrichb07fd55b2019-04-01 09:24:3770// A list containing apps or extensions that Chrome will silently install on the
71// login screen on Chrome OS at startup time. It is a list of strings, each
72// string contains an app ID and an update URL, delimited by a semicolon. This
73// preference is set by an admin policy, and meant to be only accessed through
74// extensions::ExternalPolicyProvider.
75extern const char kLoginScreenExtensions[];
achuith4607f072017-03-08 11:49:1376
[email protected]234fc5ff2014-01-16 23:32:2877// String pref for what version chrome was last time the extension prefs were
78// loaded.
79extern const char kLastChromeVersion[];
80
[email protected]234fc5ff2014-01-16 23:32:2881// Blacklist and whitelist for Native Messaging Hosts.
82extern const char kNativeMessagingBlacklist[];
83extern const char kNativeMessagingWhitelist[];
84
[email protected]2c8005d72014-01-27 21:34:2885// Flag allowing usage of Native Messaging hosts installed on user level.
86extern const char kNativeMessagingUserLevelHosts[];
87
[email protected]234fc5ff2014-01-16 23:32:2888// Time of the next scheduled extensions auto-update checks.
89extern const char kNextUpdateCheck[];
90
Peter Boströma940aa482019-06-03 22:28:4091// A preference that tracks extensions pinned to the toolbar. This is a list
92// object stored in the Preferences file. The extensions are stored by ID.
93extern const char kPinnedExtensions[];
94
[email protected]234fc5ff2014-01-16 23:32:2895// Indicates on-disk data might have skeletal data that needs to be cleaned
96// on the next start of the browser.
97extern const char kStorageGarbageCollect[];
98
99// A preference that tracks browser action toolbar configuration. This is a list
100// object stored in the Preferences file. The extensions are stored by ID.
101extern const char kToolbar[];
102
103// Integer pref that tracks the number of browser actions visible in the browser
104// actions toolbar.
105extern const char kToolbarSize[];
106
107// Properties in kExtensions dictionaries --------------------------------------
108
109// Extension-controlled preferences.
[email protected]6d8a0b092013-06-12 20:54:13110extern const char kPrefPreferences[];
111
[email protected]234fc5ff2014-01-16 23:32:28112// Extension-controlled incognito preferences.
[email protected]6d8a0b092013-06-12 20:54:13113extern const char kPrefIncognitoPreferences[];
114
[email protected]234fc5ff2014-01-16 23:32:28115// Extension-controlled regular-only preferences.
[email protected]6d8a0b092013-06-12 20:54:13116extern const char kPrefRegularOnlyPreferences[];
117
[email protected]234fc5ff2014-01-16 23:32:28118// Extension-set content settings.
[email protected]6d8a0b092013-06-12 20:54:13119extern const char kPrefContentSettings[];
120
[email protected]234fc5ff2014-01-16 23:32:28121// Extension-set incognito content settings.
[email protected]6d8a0b092013-06-12 20:54:13122extern const char kPrefIncognitoContentSettings[];
123
124} // namespace pref_names
[email protected]6d8a0b092013-06-12 20:54:13125} // namespace extensions
126
127#endif // EXTENSIONS_BROWSER_PREF_NAMES_H_