blob: b6ade0130ad96599eb80204db1a51aaf4a12bcd7 [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]05d3647e2014-02-11 04:59:0942// Integer which specifies the launch type that bookmark apps are created with
43// by default.
44extern const char kBookmarkAppCreationLaunchType[];
45
[email protected]234fc5ff2014-01-16 23:32:2846// Dictionary pref that keeps track of per-extension settings. The keys are
47// extension ids.
48extern const char kExtensions[];
49
binjinb2454382014-09-22 15:17:4350// Dictionary pref that manages extensions, controlled by policy.
51// Values are expected to conform to the schema of the ExtensionManagement
52// policy.
53extern const char kExtensionManagement[];
54
Joshua Pawlickifd01b7c2019-01-17 16:18:3455// Policy that indicates whether CRX2 extension updates are allowed.
56extern const char kInsecureExtensionUpdatesEnabled[];
57
[email protected]234fc5ff2014-01-16 23:32:2858// A whitelist of extension ids the user can install: exceptions from the
59// following blacklist.
60extern const char kInstallAllowList[];
61
62// A blacklist, containing extensions the user cannot install. This list can
63// contain "*" meaning all extensions. This list should not be confused with the
64// extension blacklist, which is Google controlled.
65extern const char kInstallDenyList[];
66
67// A list containing extensions that Chrome will silently install
68// at startup time. It is a list of strings, each string contains
69// an extension ID and an update URL, delimited by a semicolon.
70// This preference is set by an admin policy, and meant to be only
71// accessed through extensions::ExternalPolicyProvider.
72extern const char kInstallForceList[];
73
achuith4607f072017-03-08 11:49:1374// A list containing apps that Chrome will silently install on the login screen
75// on Chrome OS at startup time. It is a list of strings, each string contains
76// an app ID and an update URL, delimited by a semicolon.
77// This preference is set by an admin policy, and meant to be only
78// accessed through extensions::ExternalPolicyProvider.
79extern const char kInstallLoginScreenAppList[];
80
[email protected]234fc5ff2014-01-16 23:32:2881// String pref for what version chrome was last time the extension prefs were
82// loaded.
83extern const char kLastChromeVersion[];
84
Hajime Hoshic7a8a7c42019-01-09 00:58:0385// Time of the last extensions auto-update check.
86extern const char kLastUpdateCheck[];
87
[email protected]234fc5ff2014-01-16 23:32:2888// Blacklist and whitelist for Native Messaging Hosts.
89extern const char kNativeMessagingBlacklist[];
90extern const char kNativeMessagingWhitelist[];
91
[email protected]2c8005d72014-01-27 21:34:2892// Flag allowing usage of Native Messaging hosts installed on user level.
93extern const char kNativeMessagingUserLevelHosts[];
94
[email protected]234fc5ff2014-01-16 23:32:2895// Time of the next scheduled extensions auto-update checks.
96extern const char kNextUpdateCheck[];
97
98// Indicates on-disk data might have skeletal data that needs to be cleaned
99// on the next start of the browser.
100extern const char kStorageGarbageCollect[];
101
102// A preference that tracks browser action toolbar configuration. This is a list
103// object stored in the Preferences file. The extensions are stored by ID.
104extern const char kToolbar[];
105
106// Integer pref that tracks the number of browser actions visible in the browser
107// actions toolbar.
108extern const char kToolbarSize[];
109
110// Properties in kExtensions dictionaries --------------------------------------
111
112// Extension-controlled preferences.
[email protected]6d8a0b092013-06-12 20:54:13113extern const char kPrefPreferences[];
114
[email protected]234fc5ff2014-01-16 23:32:28115// Extension-controlled incognito preferences.
[email protected]6d8a0b092013-06-12 20:54:13116extern const char kPrefIncognitoPreferences[];
117
[email protected]234fc5ff2014-01-16 23:32:28118// Extension-controlled regular-only preferences.
[email protected]6d8a0b092013-06-12 20:54:13119extern const char kPrefRegularOnlyPreferences[];
120
[email protected]234fc5ff2014-01-16 23:32:28121// Extension-set content settings.
[email protected]6d8a0b092013-06-12 20:54:13122extern const char kPrefContentSettings[];
123
[email protected]234fc5ff2014-01-16 23:32:28124// Extension-set incognito content settings.
[email protected]6d8a0b092013-06-12 20:54:13125extern const char kPrefIncognitoContentSettings[];
126
127} // namespace pref_names
[email protected]6d8a0b092013-06-12 20:54:13128} // namespace extensions
129
130#endif // EXTENSIONS_BROWSER_PREF_NAMES_H_