[email protected] | 6d8a0b09 | 2013-06-12 20:54:13 | [diff] [blame] | 1 | // 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] | 6d8a0b09 | 2013-06-12 20:54:13 | [diff] [blame] | 12 | // Preference keys which are needed by both the ExtensionPrefs and by external |
| 13 | // clients, such as APIs. |
[email protected] | 234fc5ff | 2014-01-16 23:32:28 | [diff] [blame] | 14 | |
| 15 | namespace extensions { |
[email protected] | 6d8a0b09 | 2013-06-12 20:54:13 | [diff] [blame] | 16 | namespace pref_names { |
| 17 | |
| 18 | // If the given |scope| is persisted, return true and populate |result| with the |
[email protected] | 234fc5ff | 2014-01-16 23:32:28 | [diff] [blame] | 19 | // 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] | 6d8a0b09 | 2013-06-12 20:54:13 | [diff] [blame] | 21 | bool ScopeToPrefName(ExtensionPrefsScope scope, std::string* result); |
| 22 | |
[email protected] | 234fc5ff | 2014-01-16 23:32:28 | [diff] [blame] | 23 | // Browser-level preferences --------------------------------------------------- |
| 24 | |
| 25 | // Whether we have run the extension-alert system (see ExtensionGlobalError) |
| 26 | // at least once for this profile. |
| 27 | extern 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. |
| 32 | extern 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. |
| 37 | extern const char kAllowedTypes[]; |
| 38 | |
hashimoto | 2d1cf166 | 2014-08-25 11:08:20 | [diff] [blame] | 39 | // A boolean that tracks whether apps are allowed to enter fullscreen mode. |
| 40 | extern const char kAppFullscreenAllowed[]; |
| 41 | |
[email protected] | 234fc5ff | 2014-01-16 23:32:28 | [diff] [blame] | 42 | // Dictionary pref that keeps track of per-extension settings. The keys are |
| 43 | // extension ids. |
| 44 | extern const char kExtensions[]; |
| 45 | |
binjin | b245438 | 2014-09-22 15:17:43 | [diff] [blame] | 46 | // Dictionary pref that manages extensions, controlled by policy. |
| 47 | // Values are expected to conform to the schema of the ExtensionManagement |
| 48 | // policy. |
| 49 | extern const char kExtensionManagement[]; |
| 50 | |
Joshua Pawlicki | fd01b7c | 2019-01-17 16:18:34 | [diff] [blame] | 51 | // Policy that indicates whether CRX2 extension updates are allowed. |
| 52 | extern const char kInsecureExtensionUpdatesEnabled[]; |
| 53 | |
[email protected] | 234fc5ff | 2014-01-16 23:32:28 | [diff] [blame] | 54 | // A whitelist of extension ids the user can install: exceptions from the |
| 55 | // following blacklist. |
| 56 | extern 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. |
| 61 | extern 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. |
| 68 | extern const char kInstallForceList[]; |
| 69 | |
Alexander Hendrich | b07fd55b | 2019-04-01 09:24:37 | [diff] [blame] | 70 | // 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. |
| 75 | extern const char kLoginScreenExtensions[]; |
achuith | 4607f07 | 2017-03-08 11:49:13 | [diff] [blame] | 76 | |
[email protected] | 234fc5ff | 2014-01-16 23:32:28 | [diff] [blame] | 77 | // String pref for what version chrome was last time the extension prefs were |
| 78 | // loaded. |
| 79 | extern const char kLastChromeVersion[]; |
| 80 | |
[email protected] | 234fc5ff | 2014-01-16 23:32:28 | [diff] [blame] | 81 | // Blacklist and whitelist for Native Messaging Hosts. |
| 82 | extern const char kNativeMessagingBlacklist[]; |
| 83 | extern const char kNativeMessagingWhitelist[]; |
| 84 | |
[email protected] | 2c8005d7 | 2014-01-27 21:34:28 | [diff] [blame] | 85 | // Flag allowing usage of Native Messaging hosts installed on user level. |
| 86 | extern const char kNativeMessagingUserLevelHosts[]; |
| 87 | |
[email protected] | 234fc5ff | 2014-01-16 23:32:28 | [diff] [blame] | 88 | // Time of the next scheduled extensions auto-update checks. |
| 89 | extern const char kNextUpdateCheck[]; |
| 90 | |
Peter Boström | a940aa48 | 2019-06-03 22:28:40 | [diff] [blame] | 91 | // 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. |
| 93 | extern const char kPinnedExtensions[]; |
| 94 | |
[email protected] | 234fc5ff | 2014-01-16 23:32:28 | [diff] [blame] | 95 | // Indicates on-disk data might have skeletal data that needs to be cleaned |
| 96 | // on the next start of the browser. |
| 97 | extern 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. |
| 101 | extern const char kToolbar[]; |
| 102 | |
| 103 | // Integer pref that tracks the number of browser actions visible in the browser |
| 104 | // actions toolbar. |
| 105 | extern const char kToolbarSize[]; |
| 106 | |
| 107 | // Properties in kExtensions dictionaries -------------------------------------- |
| 108 | |
| 109 | // Extension-controlled preferences. |
[email protected] | 6d8a0b09 | 2013-06-12 20:54:13 | [diff] [blame] | 110 | extern const char kPrefPreferences[]; |
| 111 | |
[email protected] | 234fc5ff | 2014-01-16 23:32:28 | [diff] [blame] | 112 | // Extension-controlled incognito preferences. |
[email protected] | 6d8a0b09 | 2013-06-12 20:54:13 | [diff] [blame] | 113 | extern const char kPrefIncognitoPreferences[]; |
| 114 | |
[email protected] | 234fc5ff | 2014-01-16 23:32:28 | [diff] [blame] | 115 | // Extension-controlled regular-only preferences. |
[email protected] | 6d8a0b09 | 2013-06-12 20:54:13 | [diff] [blame] | 116 | extern const char kPrefRegularOnlyPreferences[]; |
| 117 | |
[email protected] | 234fc5ff | 2014-01-16 23:32:28 | [diff] [blame] | 118 | // Extension-set content settings. |
[email protected] | 6d8a0b09 | 2013-06-12 20:54:13 | [diff] [blame] | 119 | extern const char kPrefContentSettings[]; |
| 120 | |
[email protected] | 234fc5ff | 2014-01-16 23:32:28 | [diff] [blame] | 121 | // Extension-set incognito content settings. |
[email protected] | 6d8a0b09 | 2013-06-12 20:54:13 | [diff] [blame] | 122 | extern const char kPrefIncognitoContentSettings[]; |
| 123 | |
| 124 | } // namespace pref_names |
[email protected] | 6d8a0b09 | 2013-06-12 20:54:13 | [diff] [blame] | 125 | } // namespace extensions |
| 126 | |
| 127 | #endif // EXTENSIONS_BROWSER_PREF_NAMES_H_ |