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.
5 #ifndef EXTENSIONS_BROWSER_PREF_NAMES_H_
6 #define EXTENSIONS_BROWSER_PREF_NAMES_H_
10 #include "extensions/browser/extension_prefs_scope.h"
12 // Preference keys which are needed by both the ExtensionPrefs and by external
13 // clients, such as APIs.
15 namespace extensions
{
16 namespace pref_names
{
18 // If the given |scope| is persisted, return true and populate |result| with the
19 // appropriate property (i.e. one of kPref*) within a kExtensions dictionary. If
20 // |scope| is not persisted, return false, and leave |result| unchanged.
21 bool ScopeToPrefName(ExtensionPrefsScope scope
, std::string
* result
);
23 // Browser-level preferences ---------------------------------------------------
25 // Whether we have run the extension-alert system (see ExtensionGlobalError)
26 // at least once for this profile.
27 extern const char kAlertsInitialized
[];
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
[];
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
37 extern const char kAllowedTypes
[];
39 // A boolean that tracks whether apps are allowed to enter fullscreen mode.
40 extern const char kAppFullscreenAllowed
[];
42 // Integer which specifies the launch type that bookmark apps are created with
44 extern const char kBookmarkAppCreationLaunchType
[];
46 // Dictionary pref that keeps track of per-extension settings. The keys are
48 extern const char kExtensions
[];
50 // Dictionary pref that manages extensions, controlled by policy.
51 // Values are expected to conform to the schema of the ExtensionManagement
53 extern const char kExtensionManagement
[];
55 // A whitelist of extension ids the user can install: exceptions from the
56 // following blacklist.
57 extern const char kInstallAllowList
[];
59 // A blacklist, containing extensions the user cannot install. This list can
60 // contain "*" meaning all extensions. This list should not be confused with the
61 // extension blacklist, which is Google controlled.
62 extern const char kInstallDenyList
[];
64 // A list containing extensions that Chrome will silently install
65 // at startup time. It is a list of strings, each string contains
66 // an extension ID and an update URL, delimited by a semicolon.
67 // This preference is set by an admin policy, and meant to be only
68 // accessed through extensions::ExternalPolicyProvider.
69 extern const char kInstallForceList
[];
71 // String pref for what version chrome was last time the extension prefs were
73 extern const char kLastChromeVersion
[];
75 // Time of the last extensions auto-update check.
76 extern const char kLastUpdateCheck
[];
78 // Blacklist and whitelist for Native Messaging Hosts.
79 extern const char kNativeMessagingBlacklist
[];
80 extern const char kNativeMessagingWhitelist
[];
82 // Flag allowing usage of Native Messaging hosts installed on user level.
83 extern const char kNativeMessagingUserLevelHosts
[];
85 // Time of the next scheduled extensions auto-update checks.
86 extern const char kNextUpdateCheck
[];
88 // Indicates on-disk data might have skeletal data that needs to be cleaned
89 // on the next start of the browser.
90 extern const char kStorageGarbageCollect
[];
92 // A preference that tracks browser action toolbar configuration. This is a list
93 // object stored in the Preferences file. The extensions are stored by ID.
94 extern const char kToolbar
[];
96 // Integer pref that tracks the number of browser actions visible in the browser
98 extern const char kToolbarSize
[];
100 // Properties in kExtensions dictionaries --------------------------------------
102 // Extension-controlled preferences.
103 extern const char kPrefPreferences
[];
105 // Extension-controlled incognito preferences.
106 extern const char kPrefIncognitoPreferences
[];
108 // Extension-controlled regular-only preferences.
109 extern const char kPrefRegularOnlyPreferences
[];
111 // Extension-set content settings.
112 extern const char kPrefContentSettings
[];
114 // Extension-set incognito content settings.
115 extern const char kPrefIncognitoContentSettings
[];
117 } // namespace pref_names
118 } // namespace extensions
120 #endif // EXTENSIONS_BROWSER_PREF_NAMES_H_