pref_names.cc revision 9ab5563a3196760eb381d102cbb2bc0f7abc6a50
1// Copyright (c) 2012 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#include "chrome/common/pref_names.h"
6
7#include "base/basictypes.h"
8#include "chrome/common/pref_font_webkit_names.h"
9
10namespace prefs {
11
12// *************** PROFILE PREFS ***************
13// These are attached to the user profile
14
15// A string property indicating whether default apps should be installed
16// in this profile.  Use the value "install" to enable defaults apps, or
17// "noinstall" to disable them.  This property is usually set in the
18// master_preferences and copied into the profile preferences on first run.
19// Defaults apps are installed only when creating a new profile.
20const char kDefaultApps[] = "default_apps";
21
22// Whether we have installed default apps yet in this profile.
23const char kDefaultAppsInstalled[] = "default_apps_installed";
24
25// Disables screenshot accelerators and extension APIs.
26// This setting resides both in profile prefs and local state. Accelerator
27// handling code reads local state, while extension APIs use profile pref.
28const char kDisableScreenshots[] = "disable_screenshots";
29
30// A boolean specifying whether the New Tab page is the home page or not.
31const char kHomePageIsNewTabPage[] = "homepage_is_newtabpage";
32
33// This is the URL of the page to load when opening new tabs.
34const char kHomePage[] = "homepage";
35
36// Maps host names to whether the host is manually allowed or blocked.
37const char kManagedModeManualHosts[] = "profile.managed.manual_hosts";
38// Maps URLs to whether the URL is manually allowed or blocked.
39const char kManagedModeManualURLs[] = "profile.managed.manual_urls";
40
41// Stores the email address associated with the google account of the custodian
42// of the managed user, set when the managed user is created.
43const char kManagedUserCustodianEmail[] = "profile.managed.custodian_email";
44
45// Stores the display name associated with the google account of the custodian
46// of the managed user, updated (if possible) each time the managed user
47// starts a session.
48const char kManagedUserCustodianName[] = "profile.managed.custodian_name";
49
50// Used to determine if the last session exited cleanly. Set to false when
51// first opened, and to true when closing. On startup if the value is false,
52// it means the profile didn't exit cleanly.
53// DEPRECATED: this is replaced by kSessionExitType and exists for backwards
54// compatability.
55const char kSessionExitedCleanly[] = "profile.exited_cleanly";
56
57// A string pref whose values is one of the values defined by
58// |ProfileImpl::kPrefExitTypeXXX|. Set to |kPrefExitTypeCrashed| on startup and
59// one of |kPrefExitTypeNormal| or |kPrefExitTypeSessionEnded| during
60// shutdown. Used to determine the exit type the last time the profile was open.
61const char kSessionExitType[] = "profile.exit_type";
62
63// An integer pref. Holds one of several values:
64// 0: (deprecated) open the homepage on startup.
65// 1: restore the last session.
66// 2: this was used to indicate a specific session should be restored. It is
67//    no longer used, but saved to avoid conflict with old preferences.
68// 3: unused, previously indicated the user wants to restore a saved session.
69// 4: restore the URLs defined in kURLsToRestoreOnStartup.
70// 5: open the New Tab Page on startup.
71const char kRestoreOnStartup[] = "session.restore_on_startup";
72
73// The URLs to restore on startup or when the home button is pressed. The URLs
74// are only restored on startup if kRestoreOnStartup is 4.
75const char kURLsToRestoreOnStartup[] = "session.urls_to_restore_on_startup";
76
77// A preference to keep track of whether we have already checked whether we
78// need to migrate the user from kRestoreOnStartup=0 to kRestoreOnStartup=4.
79// We only need to do this check once, on upgrade from m18 or lower to m19 or
80// higher.
81const char kRestoreOnStartupMigrated[] = "session.restore_on_startup_migrated";
82
83// The application locale.
84// For OS_CHROMEOS we maintain kApplicationLocale property in both local state
85// and user's profile.  Global property determines locale of login screen,
86// while user's profile determines his personal locale preference.
87const char kApplicationLocale[] = "intl.app_locale";
88#if defined(OS_CHROMEOS)
89// Locale preference of device' owner.  ChromeOS device appears in this locale
90// after startup/wakeup/signout.
91const char kOwnerLocale[] = "intl.owner_locale";
92// Locale accepted by user.  Non-syncable.
93// Used to determine whether we need to show Locale Change notification.
94const char kApplicationLocaleAccepted[] = "intl.app_locale_accepted";
95// Non-syncable item.
96// It is used in two distinct ways.
97// (1) Used for two-step initialization of locale in ChromeOS
98//     because synchronization of kApplicationLocale is not instant.
99// (2) Used to detect locale change.  Locale change is detected by
100//     LocaleChangeGuard in case values of kApplicationLocaleBackup and
101//     kApplicationLocale are both non-empty and differ.
102// Following is a table showing how state of those prefs may change upon
103// common real-life use cases:
104//                                  AppLocale Backup Accepted
105// Initial login                       -        A       -
106// Sync                                B        A       -
107// Accept (B)                          B        B       B
108// -----------------------------------------------------------
109// Initial login                       -        A       -
110// No sync and second login            A        A       -
111// Change options                      B        B       -
112// -----------------------------------------------------------
113// Initial login                       -        A       -
114// Sync                                A        A       -
115// Locale changed on login screen      A        C       -
116// Accept (A)                          A        A       A
117// -----------------------------------------------------------
118// Initial login                       -        A       -
119// Sync                                B        A       -
120// Revert                              A        A       -
121const char kApplicationLocaleBackup[] = "intl.app_locale_backup";
122#endif
123
124// The default character encoding to assume for a web page in the
125// absence of MIME charset specification
126const char kDefaultCharset[] = "intl.charset_default";
127
128// The value to use for Accept-Languages HTTP header when making an HTTP
129// request.
130const char kAcceptLanguages[] = "intl.accept_languages";
131
132// The value to use for showing locale-dependent encoding list for different
133// locale, it's initialized from the corresponding string resource that is
134// stored in non-translatable part of the resource bundle.
135const char kStaticEncodings[] = "intl.static_encodings";
136
137// Obselete WebKit prefs for migration.
138const char kGlobalDefaultCharset[] = "intl.global.charset_default";
139const char kWebKitGlobalDefaultFontSize[] =
140    "webkit.webprefs.global.default_font_size";
141const char kWebKitGlobalDefaultFixedFontSize[] =
142    "webkit.webprefs.global.default_fixed_font_size";
143const char kWebKitGlobalMinimumFontSize[] =
144    "webkit.webprefs.global.minimum_font_size";
145const char kWebKitGlobalMinimumLogicalFontSize[] =
146    "webkit.webprefs.global.minimum_logical_font_size";
147const char kWebKitGlobalJavascriptCanOpenWindowsAutomatically[] =
148    "webkit.webprefs.global.javascript_can_open_windows_automatically";
149const char kWebKitGlobalJavascriptEnabled[] =
150    "webkit.webprefs.global.javascript_enabled";
151const char kWebKitGlobalLoadsImagesAutomatically[] =
152    "webkit.webprefs.global.loads_images_automatically";
153const char kWebKitGlobalPluginsEnabled[] =
154    "webkit.webprefs.global.plugins_enabled";
155const char kWebKitGlobalStandardFontFamily[] =
156    "webkit.webprefs.global.standard_font_family";
157const char kWebKitGlobalFixedFontFamily[] =
158    "webkit.webprefs.global.fixed_font_family";
159const char kWebKitGlobalSerifFontFamily[] =
160    "webkit.webprefs.global.serif_font_family";
161const char kWebKitGlobalSansSerifFontFamily[] =
162    "webkit.webprefs.global.sansserif_font_family";
163const char kWebKitGlobalCursiveFontFamily[] =
164    "webkit.webprefs.global.cursive_font_family";
165const char kWebKitGlobalFantasyFontFamily[] =
166    "webkit.webprefs.global.fantasy_font_family";
167const char kWebKitOldStandardFontFamily[] =
168    "webkit.webprefs.standard_font_family";
169const char kWebKitOldFixedFontFamily[] = "webkit.webprefs.fixed_font_family";
170const char kWebKitOldSerifFontFamily[] = "webkit.webprefs.serif_font_family";
171const char kWebKitOldSansSerifFontFamily[] =
172    "webkit.webprefs.sansserif_font_family";
173const char kWebKitOldCursiveFontFamily[] =
174    "webkit.webprefs.cursive_font_family";
175const char kWebKitOldFantasyFontFamily[] =
176    "webkit.webprefs.fantasy_font_family";
177
178// If these change, the corresponding enums in the extension API
179// experimental.fontSettings.json must also change.
180const char* const kWebKitScriptsForFontFamilyMaps[] = {
181#define EXPAND_SCRIPT_FONT(x, script_name) script_name ,
182#include "chrome/common/pref_font_script_names-inl.h"
183ALL_FONT_SCRIPTS("unused param")
184#undef EXPAND_SCRIPT_FONT
185};
186
187const size_t kWebKitScriptsForFontFamilyMapsLength =
188    arraysize(kWebKitScriptsForFontFamilyMaps);
189
190// Strings for WebKit font family preferences. If these change, the pref prefix
191// in pref_names_util.cc and the pref format in font_settings_api.cc must also
192// change.
193const char kWebKitStandardFontFamilyMap[] =
194    WEBKIT_WEBPREFS_FONTS_STANDARD;
195const char kWebKitFixedFontFamilyMap[] =
196    WEBKIT_WEBPREFS_FONTS_FIXED;
197const char kWebKitSerifFontFamilyMap[] =
198    WEBKIT_WEBPREFS_FONTS_SERIF;
199const char kWebKitSansSerifFontFamilyMap[] =
200    WEBKIT_WEBPREFS_FONTS_SANSERIF;
201const char kWebKitCursiveFontFamilyMap[] =
202    WEBKIT_WEBPREFS_FONTS_CURSIVE;
203const char kWebKitFantasyFontFamilyMap[] =
204    WEBKIT_WEBPREFS_FONTS_FANTASY;
205const char kWebKitPictographFontFamilyMap[] =
206    WEBKIT_WEBPREFS_FONTS_PICTOGRAPH;
207const char kWebKitStandardFontFamilyArabic[] =
208    "webkit.webprefs.fonts.standard.Arab";
209const char kWebKitFixedFontFamilyArabic[] =
210    "webkit.webprefs.fonts.fixed.Arab";
211const char kWebKitSerifFontFamilyArabic[] =
212    "webkit.webprefs.fonts.serif.Arab";
213const char kWebKitSansSerifFontFamilyArabic[] =
214    "webkit.webprefs.fonts.sansserif.Arab";
215const char kWebKitStandardFontFamilyCyrillic[] =
216    "webkit.webprefs.fonts.standard.Cyrl";
217const char kWebKitFixedFontFamilyCyrillic[] =
218    "webkit.webprefs.fonts.fixed.Cyrl";
219const char kWebKitSerifFontFamilyCyrillic[] =
220    "webkit.webprefs.fonts.serif.Cyrl";
221const char kWebKitSansSerifFontFamilyCyrillic[] =
222    "webkit.webprefs.fonts.sansserif.Cyrl";
223const char kWebKitStandardFontFamilyGreek[] =
224    "webkit.webprefs.fonts.standard.Grek";
225const char kWebKitFixedFontFamilyGreek[] =
226    "webkit.webprefs.fonts.fixed.Grek";
227const char kWebKitSerifFontFamilyGreek[] =
228    "webkit.webprefs.fonts.serif.Grek";
229const char kWebKitSansSerifFontFamilyGreek[] =
230    "webkit.webprefs.fonts.sansserif.Grek";
231const char kWebKitStandardFontFamilyJapanese[] =
232    "webkit.webprefs.fonts.standard.Jpan";
233const char kWebKitFixedFontFamilyJapanese[] =
234    "webkit.webprefs.fonts.fixed.Jpan";
235const char kWebKitSerifFontFamilyJapanese[] =
236    "webkit.webprefs.fonts.serif.Jpan";
237const char kWebKitSansSerifFontFamilyJapanese[] =
238    "webkit.webprefs.fonts.sansserif.Jpan";
239const char kWebKitStandardFontFamilyKorean[] =
240    "webkit.webprefs.fonts.standard.Hang";
241const char kWebKitFixedFontFamilyKorean[] =
242    "webkit.webprefs.fonts.fixed.Hang";
243const char kWebKitSerifFontFamilyKorean[] =
244    "webkit.webprefs.fonts.serif.Hang";
245const char kWebKitSansSerifFontFamilyKorean[] =
246    "webkit.webprefs.fonts.sansserif.Hang";
247const char kWebKitCursiveFontFamilyKorean[] =
248    "webkit.webprefs.fonts.cursive.Hang";
249const char kWebKitStandardFontFamilySimplifiedHan[] =
250    "webkit.webprefs.fonts.standard.Hans";
251const char kWebKitFixedFontFamilySimplifiedHan[] =
252    "webkit.webprefs.fonts.fixed.Hans";
253const char kWebKitSerifFontFamilySimplifiedHan[] =
254    "webkit.webprefs.fonts.serif.Hans";
255const char kWebKitSansSerifFontFamilySimplifiedHan[] =
256    "webkit.webprefs.fonts.sansserif.Hans";
257const char kWebKitStandardFontFamilyTraditionalHan[] =
258    "webkit.webprefs.fonts.standard.Hant";
259const char kWebKitFixedFontFamilyTraditionalHan[] =
260    "webkit.webprefs.fonts.fixed.Hant";
261const char kWebKitSerifFontFamilyTraditionalHan[] =
262    "webkit.webprefs.fonts.serif.Hant";
263const char kWebKitSansSerifFontFamilyTraditionalHan[] =
264    "webkit.webprefs.fonts.sansserif.Hant";
265
266// WebKit preferences.
267const char kWebKitWebSecurityEnabled[] = "webkit.webprefs.web_security_enabled";
268const char kWebKitDomPasteEnabled[] = "webkit.webprefs.dom_paste_enabled";
269const char kWebKitShrinksStandaloneImagesToFit[] =
270    "webkit.webprefs.shrinks_standalone_images_to_fit";
271const char kWebKitInspectorSettings[] = "webkit.webprefs.inspector_settings";
272const char kWebKitUsesUniversalDetector[] =
273    "webkit.webprefs.uses_universal_detector";
274const char kWebKitTextAreasAreResizable[] =
275    "webkit.webprefs.text_areas_are_resizable";
276const char kWebKitJavaEnabled[] = "webkit.webprefs.java_enabled";
277const char kWebkitTabsToLinks[] = "webkit.webprefs.tabs_to_links";
278const char kWebKitAllowDisplayingInsecureContent[] =
279    "webkit.webprefs.allow_displaying_insecure_content";
280const char kWebKitAllowRunningInsecureContent[] =
281    "webkit.webprefs.allow_running_insecure_content";
282#if defined(OS_ANDROID)
283const char kWebKitFontScaleFactor[] = "webkit.webprefs.font_scale_factor";
284const char kWebKitForceEnableZoom[] = "webkit.webprefs.force_enable_zoom";
285const char kWebKitPasswordEchoEnabled[] =
286    "webkit.webprefs.password_echo_enabled";
287#endif
288
289const char kWebKitCommonScript[] = "Zyyy";
290const char kWebKitStandardFontFamily[] = "webkit.webprefs.fonts.standard.Zyyy";
291const char kWebKitFixedFontFamily[] = "webkit.webprefs.fonts.fixed.Zyyy";
292const char kWebKitSerifFontFamily[] = "webkit.webprefs.fonts.serif.Zyyy";
293const char kWebKitSansSerifFontFamily[] =
294    "webkit.webprefs.fonts.sansserif.Zyyy";
295const char kWebKitCursiveFontFamily[] = "webkit.webprefs.fonts.cursive.Zyyy";
296const char kWebKitFantasyFontFamily[] = "webkit.webprefs.fonts.fantasy.Zyyy";
297const char kWebKitPictographFontFamily[] =
298    "webkit.webprefs.fonts.pictograph.Zyyy";
299const char kWebKitDefaultFontSize[] = "webkit.webprefs.default_font_size";
300const char kWebKitDefaultFixedFontSize[] =
301    "webkit.webprefs.default_fixed_font_size";
302const char kWebKitMinimumFontSize[] = "webkit.webprefs.minimum_font_size";
303const char kWebKitMinimumLogicalFontSize[] =
304    "webkit.webprefs.minimum_logical_font_size";
305const char kWebKitJavascriptEnabled[] = "webkit.webprefs.javascript_enabled";
306const char kWebKitJavascriptCanOpenWindowsAutomatically[] =
307    "webkit.webprefs.javascript_can_open_windows_automatically";
308const char kWebKitLoadsImagesAutomatically[] =
309    "webkit.webprefs.loads_images_automatically";
310const char kWebKitPluginsEnabled[] = "webkit.webprefs.plugins_enabled";
311
312// Boolean which specifies whether the bookmark bar is visible on all tabs.
313const char kShowBookmarkBar[] = "bookmark_bar.show_on_all_tabs";
314
315// Boolean which specifies whether the apps shortcut is visible on the bookmark
316// bar.
317const char kShowAppsShortcutInBookmarkBar[] = "bookmark_bar.show_apps_shortcut";
318
319// Boolean which specifies the ids of the bookmark nodes that are expanded in
320// the bookmark editor.
321const char kBookmarkEditorExpandedNodes[] = "bookmark_editor.expanded_nodes";
322
323// Boolean controlling whether password generation is enabled (will allow users
324// to generated passwords on account creation pages).
325const char kPasswordGenerationEnabled[] = "password_generation.enabled";
326
327// Boolean that is true if the password manager is on (will record new
328// passwords and fill in known passwords).
329const char kPasswordManagerEnabled[] = "profile.password_manager_enabled";
330
331// Boolean controlling whether the password manager allows to retrieve passwords
332// in clear text.
333const char kPasswordManagerAllowShowPasswords[] =
334    "profile.password_manager_allow_show_passwords";
335
336// Booleans identifying whether normal and reverse auto-logins are enabled.
337const char kAutologinEnabled[] = "autologin.enabled";
338const char kReverseAutologinEnabled[] = "reverse_autologin.enabled";
339
340// List to keep track of emails for which the user has rejected one-click
341// sign-in.
342const char kReverseAutologinRejectedEmailList[] =
343    "reverse_autologin.rejected_email_list";
344
345// Boolean that is true when SafeBrowsing is enabled.
346const char kSafeBrowsingEnabled[] = "safebrowsing.enabled";
347
348// Boolean that is true when SafeBrowsing Malware Report is enabled.
349const char kSafeBrowsingReportingEnabled[] =
350    "safebrowsing.reporting_enabled";
351
352// Boolean that is true when the SafeBrowsing interstitial should not allow
353// users to proceed anyway.
354const char kSafeBrowsingProceedAnywayDisabled[] =
355    "safebrowsing.proceed_anyway_disabled";
356
357// Enum that specifies whether Incognito mode is:
358// 0 - Enabled. Default behaviour. Default mode is available on demand.
359// 1 - Disabled. Used cannot browse pages in Incognito mode.
360// 2 - Forced. All pages/sessions are forced into Incognito.
361const char kIncognitoModeAvailability[] = "incognito.mode_availability";
362
363// Boolean that is true when Suggest support is enabled.
364const char kSearchSuggestEnabled[] = "search.suggest_enabled";
365
366// Boolean that indicates whether the browser should put up a confirmation
367// window when the user is attempting to quit. Mac only.
368const char kConfirmToQuitEnabled[] = "browser.confirm_to_quit";
369
370// OBSOLETE.  Enum that specifies whether to enforce a third-party cookie
371// blocking policy.  This has been superseded by kDefaultContentSettings +
372// kBlockThirdPartyCookies.
373// 0 - allow all cookies.
374// 1 - block third-party cookies
375// 2 - block all cookies
376const char kCookieBehavior[] = "security.cookie_behavior";
377
378// The GUID of the synced default search provider. Note that this acts like a
379// pointer to which synced search engine should be the default, rather than the
380// prefs below which describe the locally saved default search provider details
381// (and are not synced). This is ignored in the case of the default search
382// provider being managed by policy.
383const char kSyncedDefaultSearchProviderGUID[] =
384    "default_search_provider.synced_guid";
385
386// Whether having a default search provider is enabled.
387const char kDefaultSearchProviderEnabled[] =
388    "default_search_provider.enabled";
389
390// The URL (as understood by TemplateURLRef) the default search provider uses
391// for searches.
392const char kDefaultSearchProviderSearchURL[] =
393    "default_search_provider.search_url";
394
395// The URL (as understood by TemplateURLRef) the default search provider uses
396// for suggestions.
397const char kDefaultSearchProviderSuggestURL[] =
398    "default_search_provider.suggest_url";
399
400// The URL (as understood by TemplateURLRef) the default search provider uses
401// for instant results.
402const char kDefaultSearchProviderInstantURL[] =
403    "default_search_provider.instant_url";
404
405// The Favicon URL (as understood by TemplateURLRef) of the default search
406// provider.
407const char kDefaultSearchProviderIconURL[] =
408    "default_search_provider.icon_url";
409
410// The input encoding (as understood by TemplateURLRef) supported by the default
411// search provider.  The various encodings are separated by ';'
412const char kDefaultSearchProviderEncodings[] =
413    "default_search_provider.encodings";
414
415// The name of the default search provider.
416const char kDefaultSearchProviderName[] = "default_search_provider.name";
417
418// The keyword of the default search provider.
419const char kDefaultSearchProviderKeyword[] = "default_search_provider.keyword";
420
421// The id of the default search provider.
422const char kDefaultSearchProviderID[] = "default_search_provider.id";
423
424// The prepopulate id of the default search provider.
425const char kDefaultSearchProviderPrepopulateID[] =
426    "default_search_provider.prepopulate_id";
427
428// The alternate urls of the default search provider.
429const char kDefaultSearchProviderAlternateURLs[] =
430    "default_search_provider.alternate_urls";
431
432// Search term placement query parameter for the default search provider.
433const char kDefaultSearchProviderSearchTermsReplacementKey[] =
434    "default_search_provider.search_terms_replacement_key";
435
436// The dictionary key used when the default search providers are given
437// in the preferences file. Normally they are copied from the master
438// preferences file.
439const char kSearchProviderOverrides[] = "search_provider_overrides";
440// The format version for the dictionary above.
441const char kSearchProviderOverridesVersion[] =
442    "search_provider_overrides_version";
443
444// Boolean which specifies whether we should ask the user if we should download
445// a file (true) or just download it automatically.
446const char kPromptForDownload[] = "download.prompt_for_download";
447
448// A boolean pref set to true if we're using Link Doctor error pages.
449const char kAlternateErrorPagesEnabled[] = "alternate_error_pages.enabled";
450
451// OBSOLETE: new pref now stored with user prefs instead of profile, as
452// kDnsPrefetchingStartupList.
453const char kDnsStartupPrefetchList[] = "StartupDNSPrefetchList";
454
455// An adaptively identified list of domain names to be pre-fetched during the
456// next startup, based on what was actually needed during this startup.
457const char kDnsPrefetchingStartupList[] = "dns_prefetching.startup_list";
458
459// OBSOLETE: new pref now stored with user prefs instead of profile, as
460// kDnsPrefetchingHostReferralList.
461const char kDnsHostReferralList[] = "HostReferralList";
462
463// A list of host names used to fetch web pages, and their commonly used
464// sub-resource hostnames (and expected latency benefits from pre-resolving, or
465// preconnecting to, such sub-resource hostnames).
466// This list is adaptively grown and pruned.
467const char kDnsPrefetchingHostReferralList[] =
468    "dns_prefetching.host_referral_list";
469
470// Disables the SPDY protocol.
471const char kDisableSpdy[] = "spdy.disabled";
472
473// Prefs for persisting HttpServerProperties.
474const char kHttpServerProperties[] = "net.http_server_properties";
475
476// Prefs for server names that support SPDY protocol.
477const char kSpdyServers[] = "spdy.servers";
478
479// Prefs for servers that support Alternate-Protocol.
480const char kAlternateProtocolServers[] = "spdy.alternate_protocol";
481
482// Disables the listed protocol schemes.
483const char kDisabledSchemes[] = "protocol.disabled_schemes";
484
485// Blocks access to the listed host patterns.
486const char kUrlBlacklist[] = "policy.url_blacklist";
487
488// Allows access to the listed host patterns, as exceptions to the blacklist.
489const char kUrlWhitelist[] = "policy.url_whitelist";
490
491#if defined(OS_ANDROID)
492// Last time that a check for cloud policy management was done. This time is
493// recorded on Android so that retries aren't attempted on every startup.
494// Instead the cloud policy registration is retried at least 1 or 3 days later.
495const char kLastPolicyCheckTime[] = "policy.last_policy_check_time";
496#endif
497
498// Prefix URL for the experimental Instant ZeroSuggest provider.
499const char kInstantUIZeroSuggestUrlPrefix[] =
500    "instant_ui.zero_suggest_url_prefix";
501
502// Used to migrate preferences from local state to user preferences to
503// enable multiple profiles.
504// BITMASK with possible values (see browser_prefs.cc for enum):
505// 0: No preferences migrated.
506// 1: DNS preferences migrated: kDnsPrefetchingStartupList and HostReferralList
507// 2: Browser window preferences migrated: kDevToolsSplitLocation and
508//    kBrowserWindowPlacement
509const char kMultipleProfilePrefMigration[] =
510    "local_state.multiple_profile_prefs_version";
511
512// A boolean pref set to true if prediction of network actions is allowed.
513// Actions include DNS prefetching, TCP and SSL preconnection, and prerendering
514// of web pages.
515// NOTE: The "dns_prefetching.enabled" value is used so that historical user
516// preferences are not lost.
517const char kNetworkPredictionEnabled[] = "dns_prefetching.enabled";
518
519// An integer representing the state of the default apps installation process.
520// This value is persisted in the profile's user preferences because the process
521// is async, and the user may have stopped chrome in the middle.  The next time
522// the profile is opened, the process will continue from where it left off.
523//
524// See possible values in external_provider_impl.cc.
525const char kDefaultAppsInstallState[] = "default_apps_install_state";
526
527// A boolean pref set to true if the Chrome Web Store icons should be hidden
528// from the New Tab Page and app launcher.
529const char kHideWebStoreIcon[] = "hide_web_store_icon";
530
531#if defined(OS_CHROMEOS)
532// A dictionary pref to hold the mute setting for all the currently known
533// audio devices.
534const char kAudioDevicesMute[] = "settings.audio.devices.mute";
535
536// A dictionary pref storing the volume settings for all the currently known
537// audio devices.
538const char kAudioDevicesVolumePercent[] =
539    "settings.audio.devices.volume_percent";
540
541// An integer pref to initially mute volume if 1. This pref is ignored if
542// |kAudioOutputAllowed| is set to false, but its value is preserved, therefore
543// when the policy is lifted the original mute state is restored.  This setting
544// is here only for migration purposes now. It is being replaced by the
545// |kAudioDevicesMute| setting.
546const char kAudioMute[] = "settings.audio.mute";
547
548// A double pref storing the user-requested volume. This setting is here only
549// for migration purposes now. It is being replaced by the
550// |kAudioDevicesVolumePercent| setting.
551const char kAudioVolumePercent[] = "settings.audio.volume_percent";
552
553// A boolean pref set to true if touchpad tap-to-click is enabled.
554const char kTapToClickEnabled[] = "settings.touchpad.enable_tap_to_click";
555
556// A boolean pref set to true if touchpad tap-dragging is enabled.
557const char kTapDraggingEnabled[] = "settings.touchpad.enable_tap_dragging";
558
559// A boolean pref set to true if touchpad three-finger-click is enabled.
560const char kEnableTouchpadThreeFingerClick[] =
561    "settings.touchpad.enable_three_finger_click";
562
563// A boolean pref set to true if touchpad natural scrolling is enabled.
564const char kNaturalScroll[] = "settings.touchpad.natural_scroll";
565
566// A boolean pref set to true if primary mouse button is the left button.
567const char kPrimaryMouseButtonRight[] = "settings.mouse.primary_right";
568
569// A integer pref for the touchpad sensitivity.
570const char kMouseSensitivity[] = "settings.mouse.sensitivity2";
571
572// A integer pref for the touchpad sensitivity.
573const char kTouchpadSensitivity[] = "settings.touchpad.sensitivity2";
574
575// A boolean pref set to true if time should be displayed in 24-hour clock.
576const char kUse24HourClock[] = "settings.clock.use_24hour_clock";
577
578// A boolean pref to disable Google Drive integration.
579// The pref prefix should remain as "gdata" for backward compatibility.
580const char kDisableDrive[] = "gdata.disabled";
581
582// A boolean pref to disable Drive over cellular connections.
583// The pref prefix should remain as "gdata" for backward compatibility.
584const char kDisableDriveOverCellular[] = "gdata.cellular.disabled";
585
586// A boolean pref to disable hosted files on Drive.
587// The pref prefix should remain as "gdata" for backward compatibility.
588const char kDisableDriveHostedFiles[] = "gdata.hosted_files.disabled";
589
590// A string pref set to the current input method.
591const char kLanguageCurrentInputMethod[] =
592    "settings.language.current_input_method";
593
594// A string pref set to the previous input method.
595const char kLanguagePreviousInputMethod[] =
596    "settings.language.previous_input_method";
597
598// A string pref (comma-separated list) set to the "next engine in menu"
599// hot-key lists.
600const char kLanguageHotkeyNextEngineInMenu[] =
601    "settings.language.hotkey_next_engine_in_menu";
602
603// A string pref (comma-separated list) set to the "previous engine"
604// hot-key lists.
605const char kLanguageHotkeyPreviousEngine[] =
606    "settings.language.hotkey_previous_engine";
607
608// A string pref (comma-separated list) set to the preferred language IDs
609// (ex. "en-US,fr,ko").
610const char kLanguagePreferredLanguages[] =
611    "settings.language.preferred_languages";
612
613// A string pref (comma-separated list) set to the preloaded (active) input
614// method IDs (ex. "pinyin,mozc").
615const char kLanguagePreloadEngines[] = "settings.language.preload_engines";
616
617// A List pref (comma-separated list) set to the extension IMEs to be enabled.
618const char kLanguageEnabledExtensionImes[] =
619    "settings.language.enabled_extension_imes";
620
621// Boolean prefs for ibus-chewing Chinese input method.
622const char kLanguageChewingAutoShiftCur[] =
623    "settings.language.chewing_auto_shift_cur";
624const char kLanguageChewingAddPhraseDirection[] =
625    "settings.language.chewing_add_phrase_direction";
626const char kLanguageChewingEasySymbolInput[] =
627    "settings.language.chewing_easy_symbol_input";
628const char kLanguageChewingEscCleanAllBuf[] =
629    "settings.language.chewing_esc_clean_all_buf";
630const char kLanguageChewingForceLowercaseEnglish[] =
631    "settings.language.chewing_force_lowercase_english";
632const char kLanguageChewingPlainZhuyin[] =
633    "settings.language.chewing_plain_zhuyin";
634const char kLanguageChewingPhraseChoiceRearward[] =
635    "settings.language.chewing_phrase_choice_rearward";
636const char kLanguageChewingSpaceAsSelection[] =
637    "settings.language.chewing_space_as_selection";
638
639// Integer prefs for ibus-chewing Chinese input method.
640const char kLanguageChewingMaxChiSymbolLen[] =
641    "settings.language.chewing_max_chi_symbol_len";
642const char kLanguageChewingCandPerPage[] =
643    "settings.language.chewing_cand_per_page";
644
645// String prefs for ibus-chewing Chinese input method.
646const char kLanguageChewingKeyboardType[] =
647    "settings.language.chewing_keyboard_type";
648const char kLanguageChewingSelKeys[] =
649    "settings.language.chewing_sel_keys";
650
651const char kLanguageChewingHsuSelKeyType[] =
652    "settings.language.chewing_hsu_sel_key_type";
653
654// A string pref which determines the keyboard layout for Hangul input method.
655const char kLanguageHangulKeyboard[] = "settings.language.hangul_keyboard";
656const char kLanguageHangulHanjaBindingKeys[] =
657    "settings.language.hangul_hanja_binding_keys";
658
659// A boolean prefs for ibus-pinyin Chinese input method.
660const char kLanguagePinyinCorrectPinyin[] =
661    "settings.language.pinyin_correct_pinyin";
662const char kLanguagePinyinFuzzyPinyin[] =
663    "settings.language.pinyin_fuzzy_pinyin";
664const char kLanguagePinyinShiftSelectCandidate[] =
665    "settings.language.pinyin_shift_select_candidate";
666const char kLanguagePinyinMinusEqualPage[] =
667    "settings.language.pinyin_minus_equal_page";
668const char kLanguagePinyinCommaPeriodPage[] =
669    "settings.language.pinyin_comma_period_page";
670const char kLanguagePinyinAutoCommit[] =
671    "settings.language.pinyin_auto_commit";
672const char kLanguagePinyinDoublePinyin[] =
673    "settings.language.pinyin_double_pinyin";
674const char kLanguagePinyinInitChinese[] =
675    "settings.language.pinyin_init_chinese";
676const char kLanguagePinyinInitFull[] =
677    "settings.language.pinyin_init_full";
678const char kLanguagePinyinInitFullPunct[] =
679    "settings.language.pinyin_init_full_punct";
680const char kLanguagePinyinInitSimplifiedChinese[] =
681    "settings.language.pinyin_init_simplified_chinese";
682const char kLanguagePinyinTradCandidate[] =
683    "settings.language.pinyin_trad_candidate";
684
685// A integer prefs for ibus-pinyin Chinese input method.
686const char kLanguagePinyinDoublePinyinSchema[] =
687    "settings.language.pinyin_double_pinyin_schema";
688const char kLanguagePinyinLookupTablePageSize[] =
689    "settings.language.pinyin_lookup_table_page_size";
690
691// A string prefs for ibus-mozc Japanese input method.
692// ibus-mozc converts the string values to protobuf enum values defined in
693// third_party/ibus-mozc/files/src/session/config.proto.
694const char kLanguageMozcPreeditMethod[] =
695    "settings.language.mozc_preedit_method";
696const char kLanguageMozcSessionKeymap[] =
697    "settings.language.mozc_session_keymap";
698const char kLanguageMozcPunctuationMethod[] =
699    "settings.language.mozc_punctuation_method";
700const char kLanguageMozcSymbolMethod[] =
701    "settings.language.mozc_symbol_method";
702const char kLanguageMozcSpaceCharacterForm[] =
703    "settings.language.mozc_space_character_form";
704const char kLanguageMozcHistoryLearningLevel[] =
705    "settings.language.mozc_history_learning_level";
706const char kLanguageMozcSelectionShortcut[] =
707    "settings.language.mozc_selection_shortcut";
708const char kLanguageMozcShiftKeyModeSwitch[] =
709    "settings.language.mozc_shift_key_mode_switch";
710const char kLanguageMozcNumpadCharacterForm[] =
711    "settings.language.mozc_numpad_character_form";
712const char kLanguageMozcIncognitoMode[] =
713    "settings.language.mozc_incognito_mode";
714const char kLanguageMozcUseAutoImeTurnOff[] =
715    "settings.language.mozc_use_auto_ime_turn_off";
716const char kLanguageMozcUseHistorySuggest[] =
717    "settings.language.mozc_use_history_suggest";
718const char kLanguageMozcUseDictionarySuggest[] =
719    "settings.language.mozc_use_dictionary_suggest";
720const char kLanguageMozcSuggestionsSize[] =
721    "settings.language.mozc_suggestions_size";
722
723// A integer prefs which determine how we remap modifier keys (e.g. swap Alt and
724// Control.) Possible values for these prefs are 0-4. See ModifierKey enum in
725// src/chrome/browser/chromeos/input_method/xkeyboard.h
726const char kLanguageRemapSearchKeyTo[] =
727    // Note: we no longer use XKB for remapping these keys, but we can't change
728    // the pref names since the names are already synced with the cloud.
729    "settings.language.xkb_remap_search_key_to";
730const char kLanguageRemapControlKeyTo[] =
731    "settings.language.xkb_remap_control_key_to";
732const char kLanguageRemapAltKeyTo[] =
733    "settings.language.xkb_remap_alt_key_to";
734const char kLanguageRemapCapsLockKeyTo[] =
735    "settings.language.remap_caps_lock_key_to";
736const char kLanguageRemapDiamondKeyTo[] =
737    "settings.language.remap_diamond_key_to";
738
739// A boolean pref which determines whether key repeat is enabled.
740const char kLanguageXkbAutoRepeatEnabled[] =
741    "settings.language.xkb_auto_repeat_enabled_r2";
742// A integer pref which determines key repeat delay (in ms).
743const char kLanguageXkbAutoRepeatDelay[] =
744    "settings.language.xkb_auto_repeat_delay_r2";
745// A integer pref which determines key repeat interval (in ms).
746const char kLanguageXkbAutoRepeatInterval[] =
747    "settings.language.xkb_auto_repeat_interval_r2";
748// "_r2" suffixes are added to the three prefs above when we change the
749// preferences not user-configurable, not to sync them with cloud.
750
751// A boolean pref which determines whether the large cursor feature is enabled.
752const char kLargeCursorEnabled[] = "settings.a11y.large_cursor_enabled";
753// A boolean pref which determines whether the sticky keys feature is enabled.
754const char kStickyKeysEnabled[] = "settings.a11y.sticky_keys_enabled";
755// A boolean pref which determines whether spoken feedback is enabled.
756const char kSpokenFeedbackEnabled[] = "settings.accessibility";
757// A boolean pref which determines whether high conrast is enabled.
758const char kHighContrastEnabled[] = "settings.a11y.high_contrast_enabled";
759// A boolean pref which determines whether screen magnifier is enabled.
760const char kScreenMagnifierEnabled[] = "settings.a11y.screen_magnifier";
761// A integer pref which determines what type of screen magnifier is enabled.
762// Note that: 'screen_magnifier_type' had been used as string pref. Hence,
763// we are using another name pref here.
764const char kScreenMagnifierType[] = "settings.a11y.screen_magnifier_type2";
765// A double pref which determines a zooming scale of the screen magnifier.
766const char kScreenMagnifierScale[] = "settings.a11y.screen_magnifier_scale";
767// A boolean pref which determines whether virtual keyboard is enabled.
768// TODO(hashimoto): Remove this pref.
769const char kVirtualKeyboardEnabled[] = "settings.a11y.virtual_keyboard";
770// A boolean pref which determines whether the accessibility menu shows
771// regardless of the state of a11y features.
772const char kShouldAlwaysShowAccessibilityMenu[] = "settings.a11y.enable_menu";
773
774// A boolean pref which turns on Advanced Filesystem
775// (USB support, SD card, etc).
776const char kLabsAdvancedFilesystemEnabled[] =
777    "settings.labs.advanced_filesystem";
778
779// A boolean pref which turns on the mediaplayer.
780const char kLabsMediaplayerEnabled[] = "settings.labs.mediaplayer";
781
782// A boolean pref that turns on screen locker.
783const char kEnableScreenLock[] = "settings.enable_screen_lock";
784
785// A boolean pref of whether to show mobile plan notifications.
786const char kShowPlanNotifications[] =
787    "settings.internet.mobile.show_plan_notifications";
788
789// A boolean pref of whether to show 3G promo notification.
790const char kShow3gPromoNotification[] =
791    "settings.internet.mobile.show_3g_promo_notification";
792
793// A string pref that contains version where "What's new" promo was shown.
794const char kChromeOSReleaseNotesVersion[] = "settings.release_notes.version";
795
796// A boolean pref that controls whether proxy settings from shared network
797// settings (accordingly from device policy) are applied or ignored.
798const char kUseSharedProxies[] = "settings.use_shared_proxies";
799
800// Power state of the current displays from the last run.
801const char kDisplayPowerState[] = "settings.display.power_state";
802// A dictionary pref that stores per display preferences.
803const char kDisplayProperties[] = "settings.display.properties";
804
805// A dictionary pref that specifies per-display layout/offset information.
806// Its key is the ID of the display and its value is a dictionary for the
807// layout/offset information.
808const char kSecondaryDisplays[] = "settings.display.secondary_displays";
809
810// A preference to keep track of the session start time. The value is set
811// after login. When the browser restarts after a crash, the pref value is not
812// changed unless it appears corrupted (value unset, value lying in the future,
813// zero value).
814const char kSessionStartTime[] = "session.start_time";
815
816// Holds the maximum session time in milliseconds. If this pref is set, the
817// user is logged out when the maximum session time is reached. The user is
818// informed about the remaining time by a countdown timer shown in the ash
819// system tray.
820const char kSessionLengthLimit[] = "session.length_limit";
821
822// Inactivity time in milliseconds while the system is on AC power before
823// the screen should be dimmed, turned off, or locked, before an
824// IdleActionImminent D-Bus signal should be sent, or before
825// kPowerAcIdleAction should be performed.  0 disables the delay (N/A for
826// kPowerAcIdleDelayMs).
827const char kPowerAcScreenDimDelayMs[] = "power.ac_screen_dim_delay_ms";
828const char kPowerAcScreenOffDelayMs[] = "power.ac_screen_off_delay_ms";
829const char kPowerAcScreenLockDelayMs[] = "power.ac_screen_lock_delay_ms";
830const char kPowerAcIdleWarningDelayMs[] = "power.ac_idle_warning_delay_ms";
831const char kPowerAcIdleDelayMs[] = "power.ac_idle_delay_ms";
832
833// Similar delays while the system is on battery power.
834const char kPowerBatteryScreenDimDelayMs[] =
835    "power.battery_screen_dim_delay_ms";
836const char kPowerBatteryScreenOffDelayMs[] =
837    "power.battery_screen_off_delay_ms";
838const char kPowerBatteryScreenLockDelayMs[] =
839    "power.battery_screen_lock_delay_ms";
840const char kPowerBatteryIdleWarningDelayMs[] =
841    "power.battery_idle_warning_delay_ms";
842const char kPowerBatteryIdleDelayMs[] =
843    "power.battery_idle_delay_ms";
844
845// Action that should be performed when the idle delay is reached while the
846// system is on AC power or battery power.
847// Values are from the chromeos::PowerPolicyController::Action enum.
848const char kPowerAcIdleAction[] = "power.ac_idle_action";
849const char kPowerBatteryIdleAction[] = "power.battery_idle_action";
850
851// Action that should be performed when the lid is closed.
852// Values are from the chromeos::PowerPolicyController::Action enum.
853const char kPowerLidClosedAction[] = "power.lid_closed_action";
854
855// Should audio and video activity be used to disable the above delays?
856const char kPowerUseAudioActivity[] = "power.use_audio_activity";
857const char kPowerUseVideoActivity[] = "power.use_video_activity";
858
859// Should extensions be able to use the chrome.power API to override
860// screen-related power management (including locking)?
861const char kPowerAllowScreenWakeLocks[] = "power.allow_screen_wake_locks";
862
863// Amount by which the screen-dim delay should be scaled while the system
864// is in presentation mode. Values are limited to a minimum of 1.0.
865const char kPowerPresentationScreenDimDelayFactor[] =
866    "power.presentation_screen_dim_delay_factor";
867
868// Amount by which the screen-dim delay should be scaled when user activity is
869// observed while the screen is dimmed or soon after the screen has been turned
870// off.  Values are limited to a minimum of 1.0.
871const char kPowerUserActivityScreenDimDelayFactor[] =
872    "power.user_activity_screen_dim_delay_factor";
873
874// The URL from which the Terms of Service can be downloaded. The value is only
875// honored for public accounts.
876const char kTermsOfServiceURL[] = "terms_of_service.url";
877
878// Indicates that the Profile has made navigations that used a certificate
879// installed by the system administrator. If that is true then the local cache
880// of remote data is tainted (e.g. shared scripts), and future navigations
881// show a warning indicating that the organization may track the browsing
882// session.
883const char kUsedPolicyCertificatesOnce[] = "used_policy_certificates_once";
884
885// Indicates whether the remote attestation is enabled for the user.
886const char kAttestationEnabled[] = "attestation.enabled";
887// The list of extensions allowed to use the platformKeysPrivate API for
888// remote attestation.
889const char kAttestationExtensionWhitelist[] = "attestation.extension_whitelist";
890
891// A boolean pref indicating whether the projection touch HUD is enabled or not.
892const char kTouchHudProjectionEnabled[] = "touch_hud.projection_enabled";
893#endif  // defined(OS_CHROMEOS)
894
895// The disabled messages in IPC logging.
896const char kIpcDisabledMessages[] = "ipc_log_disabled_messages";
897
898// A boolean pref set to true if a Home button to open the Home pages should be
899// visible on the toolbar.
900const char kShowHomeButton[] = "browser.show_home_button";
901
902// A string value which saves short list of recently user selected encodings
903// separated with comma punctuation mark.
904const char kRecentlySelectedEncoding[] = "profile.recently_selected_encodings";
905
906// Clear Browsing Data dialog preferences.
907const char kDeleteBrowsingHistory[] = "browser.clear_data.browsing_history";
908const char kDeleteDownloadHistory[] = "browser.clear_data.download_history";
909const char kDeleteCache[] = "browser.clear_data.cache";
910const char kDeleteCookies[] = "browser.clear_data.cookies";
911const char kDeletePasswords[] = "browser.clear_data.passwords";
912const char kDeleteFormData[] = "browser.clear_data.form_data";
913const char kDeleteHostedAppsData[] = "browser.clear_data.hosted_apps_data";
914const char kDeauthorizeContentLicenses[] =
915    "browser.clear_data.content_licenses";
916const char kDeleteTimePeriod[] = "browser.clear_data.time_period";
917const char kLastClearBrowsingDataTime[] =
918    "browser.last_clear_browsing_data_time";
919
920// Boolean pref to define the default values for using spellchecker.
921const char kEnableContinuousSpellcheck[] = "browser.enable_spellchecking";
922
923// List of names of the enabled labs experiments (see chrome/browser/labs.cc).
924const char kEnabledLabsExperiments[] = "browser.enabled_labs_experiments";
925
926// Boolean pref to define the default values for using auto spell correct.
927const char kEnableAutoSpellCorrect[] = "browser.enable_autospellcorrect";
928
929// Boolean pref to define the default setting for "block offensive words".
930// The old key value is kept to avoid unnecessary migration code.
931const char kSpeechRecognitionFilterProfanities[] =
932    "browser.speechinput_censor_results";
933
934// List of speech recognition context names (extensions or websites) for which
935// the tray notification balloon has already been shown.
936const char kSpeechRecognitionTrayNotificationShownContexts[] =
937    "browser.speechinput_tray_notification_shown_contexts";
938
939// Boolean controlling whether history saving is disabled.
940const char kSavingBrowserHistoryDisabled[] = "history.saving_disabled";
941
942// Boolean controlling whether deleting browsing and download history is
943// permitted.
944const char kAllowDeletingBrowserHistory[] = "history.deleting_enabled";
945
946// Boolean controlling whether SafeSearch is mandatory for Google Web Searches.
947const char kForceSafeSearch[] = "settings.force_safesearch";
948
949#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
950// Linux specific preference on whether we should match the system theme.
951const char kUsesSystemTheme[] = "extensions.theme.use_system";
952#endif
953const char kCurrentThemePackFilename[] = "extensions.theme.pack";
954const char kCurrentThemeID[] = "extensions.theme.id";
955const char kCurrentThemeImages[] = "extensions.theme.images";
956const char kCurrentThemeColors[] = "extensions.theme.colors";
957const char kCurrentThemeTints[] = "extensions.theme.tints";
958const char kCurrentThemeDisplayProperties[] = "extensions.theme.properties";
959
960// Boolean pref which persists whether the extensions_ui is in developer mode
961// (showing developer packing tools and extensions details)
962const char kExtensionsUIDeveloperMode[] = "extensions.ui.developer_mode";
963
964// Integer pref that tracks the number of browser actions visible in the browser
965// actions toolbar.
966const char kExtensionToolbarSize[] = "extensions.toolbarsize";
967
968// A preference that tracks browser action toolbar configuration. This is a list
969// object stored in the Preferences file. The extensions are stored by ID.
970const char kExtensionToolbar[] = "extensions.toolbar";
971
972// Dictionary pref that tracks which command belongs to which
973// extension + named command pair.
974const char kExtensionCommands[] = "extensions.commands";
975
976// Pref containing the directory for internal plugins as written to the plugins
977// list (below).
978const char kPluginsLastInternalDirectory[] = "plugins.last_internal_directory";
979
980// List pref containing information (dictionaries) on plugins.
981const char kPluginsPluginsList[] = "plugins.plugins_list";
982
983// List pref containing names of plugins that are disabled by policy.
984const char kPluginsDisabledPlugins[] = "plugins.plugins_disabled";
985
986// List pref containing exceptions to the list of plugins disabled by policy.
987const char kPluginsDisabledPluginsExceptions[] =
988    "plugins.plugins_disabled_exceptions";
989
990// List pref containing names of plugins that are enabled by policy.
991const char kPluginsEnabledPlugins[] = "plugins.plugins_enabled";
992
993// When bundled NPAPI Flash is removed, if at that point it is enabled while
994// Pepper Flash is disabled, we would like to turn on Pepper Flash. And we will
995// want to do so only once.
996const char kPluginsMigratedToPepperFlash[] = "plugins.migrated_to_pepper_flash";
997
998// In the early stage of component-updated PPAPI Flash, we did field trials in
999// which it was set to disabled by default. The corresponding settings item may
1000// remain in some users' profiles. Currently it affects both the bundled and
1001// component-updated PPAPI Flash (since the two share the same enable/disable
1002// state). We want to remove this item to get those users to use PPAPI Flash.
1003// We will want to do so only once.
1004const char kPluginsRemovedOldComponentPepperFlashSettings[] =
1005    "plugins.removed_old_component_pepper_flash_settings";
1006
1007#if !defined(OS_ANDROID)
1008// Whether about:plugins is shown in the details mode or not.
1009const char kPluginsShowDetails[] = "plugins.show_details";
1010#endif
1011
1012// Boolean that indicates whether outdated plugins are allowed or not.
1013const char kPluginsAllowOutdated[] = "plugins.allow_outdated";
1014
1015// Boolean that indicates whether plugins that require authorization should
1016// be always allowed or not.
1017const char kPluginsAlwaysAuthorize[] = "plugins.always_authorize";
1018
1019#if defined(ENABLE_PLUGIN_INSTALLATION)
1020// Dictionary holding plug-ins metadata.
1021const char kPluginsMetadata[] = "plugins.metadata";
1022
1023// Last update time of plug-ins resource cache.
1024const char kPluginsResourceCacheUpdate[] = "plugins.resource_cache_update";
1025#endif
1026
1027// Boolean that indicates whether we should check if we are the default browser
1028// on start-up.
1029const char kCheckDefaultBrowser[] = "browser.check_default_browser";
1030
1031#if defined(OS_WIN)
1032// By default, setting Chrome as default during first run on Windows 8 will
1033// trigger shutting down the current instance and spawning a new (Metro)
1034// Chrome. This boolean preference supresses this behaviour.
1035const char kSuppressSwitchToMetroModeOnSetDefault[] =
1036    "browser.suppress_switch_to_metro_mode_on_set_default";
1037#endif
1038
1039// Policy setting whether default browser check should be disabled and default
1040// browser registration should take place.
1041const char kDefaultBrowserSettingEnabled[] =
1042    "browser.default_browser_setting_enabled";
1043
1044#if defined(OS_MACOSX)
1045// Boolean that indicates whether the application should show the info bar
1046// asking the user to set up automatic updates when Keystone promotion is
1047// required.
1048const char kShowUpdatePromotionInfoBar[] =
1049    "browser.show_update_promotion_info_bar";
1050#endif
1051
1052// Boolean that is false if we should show window manager decorations.  If
1053// true, we draw a custom chrome frame (thicker title bar and blue border).
1054const char kUseCustomChromeFrame[] = "browser.custom_chrome_frame";
1055
1056// The preferred position (which corner of screen) for desktop notifications.
1057const char kDesktopNotificationPosition[] =
1058    "browser.desktop_notification_position";
1059
1060// Dictionary of content settings applied to all hosts by default.
1061const char kDefaultContentSettings[] = "profile.default_content_settings";
1062
1063// Boolean indicating whether the clear on exit pref was migrated to content
1064// settings yet.
1065const char kContentSettingsClearOnExitMigrated[] =
1066    "profile.content_settings.clear_on_exit_migrated";
1067
1068// Version of the pattern format used to define content settings.
1069const char kContentSettingsVersion[] = "profile.content_settings.pref_version";
1070
1071// Patterns for mapping origins to origin related settings. Default settings
1072// will be applied to origins that don't match any of the patterns. The pattern
1073// format used is defined by kContentSettingsVersion.
1074const char kContentSettingsPatternPairs[] =
1075    "profile.content_settings.pattern_pairs";
1076
1077// Version of the content settings whitelist.
1078const char kContentSettingsDefaultWhitelistVersion[] =
1079    "profile.content_settings.whitelist_version";
1080
1081#if !defined(OS_ANDROID)
1082// Which plugins have been whitelisted manually by the user.
1083const char kContentSettingsPluginWhitelist[] =
1084    "profile.content_settings.plugin_whitelist";
1085#endif
1086
1087// Boolean that is true if we should unconditionally block third-party cookies,
1088// regardless of other content settings.
1089const char kBlockThirdPartyCookies[] = "profile.block_third_party_cookies";
1090
1091// Boolean that is true when all locally stored site data (e.g. cookies, local
1092// storage, etc..) should be deleted on exit.
1093const char kClearSiteDataOnExit[] = "profile.clear_site_data_on_exit";
1094
1095// Double that indicates the default zoom level.
1096const char kDefaultZoomLevel[] = "profile.default_zoom_level";
1097
1098// Dictionary that maps hostnames to zoom levels.  Hosts not in this pref will
1099// be displayed at the default zoom level.
1100const char kPerHostZoomLevels[] = "profile.per_host_zoom_levels";
1101
1102// A dictionary that tracks the default data model to use for each section of
1103// the dialog.
1104const char kAutofillDialogAutofillDefault[] = "autofill.data_model_default";
1105
1106// Whether a user has ever paid with Wallet via the autofill dialog.
1107const char kAutofillDialogHasPaidWithWallet[] = "autofill.has_paid_with_wallet";
1108
1109// Whether a user opted out of making purchases with Google Wallet; changed via
1110// the autofill dialog's account chooser and set explicitly on dialog submission
1111// (but not cancel). If this isn't set, the dialog assumes it's the first run.
1112const char kAutofillDialogPayWithoutWallet[] = "autofill.pay_without_wallet";
1113
1114// The number of times the dialog has been shown (all time).
1115const char kAutofillDialogShowCount[] = "autofill.show_count";
1116
1117// The number of times the generated credit card bubble has been shown.
1118const char kAutofillGeneratedCardBubbleTimesShown[] =
1119    "autofill.generated_card_bubble_times_shown";
1120
1121// Modifying bookmarks is completely disabled when this is set to false.
1122const char kEditBookmarksEnabled[] = "bookmarks.editing_enabled";
1123
1124// Boolean that is true when the translate feature is enabled.
1125const char kEnableTranslate[] = "translate.enabled";
1126
1127#if !defined(OS_ANDROID)
1128const char kPinnedTabs[] = "pinned_tabs";
1129#endif
1130
1131#if defined(OS_ANDROID)
1132// Boolean that controls the enabled-state of Geolocation in content.
1133const char kGeolocationEnabled[] = "geolocation.enabled";
1134#endif
1135
1136#if defined(ENABLE_GOOGLE_NOW)
1137// Boolean that is true when Google services can use the user's location.
1138const char kGoogleGeolocationAccessEnabled[] =
1139    "googlegeolocationaccess.enabled";
1140#endif
1141
1142// The default audio capture device used by the Media content setting.
1143const char kDefaultAudioCaptureDevice[] = "media.default_audio_capture_device";
1144
1145// The default video capture device used by the Media content setting.
1146const char kDefaultVideoCaptureDevice[] = "media.default_video_capture_Device";
1147
1148// Preference to disable 3D APIs (WebGL, Pepper 3D).
1149const char kDisable3DAPIs[] = "disable_3d_apis";
1150
1151// Whether to enable hyperlink auditing ("<a ping>").
1152const char kEnableHyperlinkAuditing[] = "enable_a_ping";
1153
1154// Whether to enable sending referrers.
1155const char kEnableReferrers[] = "enable_referrers";
1156
1157// Whether to send the DNT header.
1158const char kEnableDoNotTrack[] = "enable_do_not_track";
1159
1160// Boolean to enable reporting memory info to page.
1161const char kEnableMemoryInfo[] = "enable_memory_info";
1162
1163// GL_VENDOR string.
1164const char kGLVendorString[] = "gl_vendor_string";
1165
1166// GL_RENDERER string.
1167const char kGLRendererString[] = "gl_renderer_string";
1168
1169// GL_VERSION string.
1170const char kGLVersionString[] = "gl_version_string";
1171
1172// Boolean that specifies whether to import bookmarks from the default browser
1173// on first run.
1174const char kImportBookmarks[] = "import_bookmarks";
1175
1176// Boolean that specifies whether to import the browsing history from the
1177// default browser on first run.
1178const char kImportHistory[] = "import_history";
1179
1180// Boolean that specifies whether to import the homepage from the default
1181// browser on first run.
1182const char kImportHomepage[] = "import_home_page";
1183
1184// Boolean that specifies whether to import the search engine from the default
1185// browser on first run.
1186const char kImportSearchEngine[] = "import_search_engine";
1187
1188// Boolean that specifies whether to import the saved passwords from the default
1189// browser on first run.
1190const char kImportSavedPasswords[] = "import_saved_passwords";
1191
1192#if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) && defined(OS_POSIX)
1193// The local profile id for this profile.
1194const char kLocalProfileId[] = "profile.local_profile_id";
1195
1196// Whether passwords in external services (e.g. GNOME Keyring) have been tagged
1197// with the local profile id yet. (Used for migrating to tagged passwords.)
1198const char kPasswordsUseLocalProfileId[] =
1199    "profile.passwords_use_local_profile_id";
1200#endif
1201
1202// Profile avatar and name
1203const char kProfileAvatarIndex[] = "profile.avatar_index";
1204const char kProfileName[] = "profile.name";
1205
1206// Whether the profile is managed.
1207const char kProfileIsManaged[] = "profile.is_managed";
1208
1209// Indicates if we've already shown a notification that high contrast
1210// mode is on, recommending high-contrast extensions and themes.
1211const char kInvertNotificationShown[] = "invert_notification_version_2_shown";
1212
1213// Boolean controlling whether printing is enabled.
1214const char kPrintingEnabled[] = "printing.enabled";
1215
1216// Boolean controlling whether print preview is disabled.
1217const char kPrintPreviewDisabled[] = "printing.print_preview_disabled";
1218
1219// An integer pref specifying the fallback behavior for sites outside of content
1220// packs. One of:
1221// 0: Allow (does nothing)
1222// 1: Warn.
1223// 2: Block.
1224const char kDefaultManagedModeFilteringBehavior[] =
1225    "profile.managed.default_filtering_behavior";
1226
1227// Whether this user is permitted to create managed users.
1228const char kManagedUserCreationAllowed[] =
1229    "profile.managed_user_creation_allowed";
1230
1231// List pref containing the users managed by this user.
1232const char kManagedUsers[] = "profile.managed_users";
1233
1234// List pref containing the extension ids which are not allowed to send
1235// notifications to the message center.
1236const char kMessageCenterDisabledExtensionIds[] =
1237    "message_center.disabled_extension_ids";
1238
1239// List pref containing the system component ids which are not allowed to send
1240// notifications to the message center.
1241const char kMessageCenterDisabledSystemComponentIds[] =
1242    "message_center.disabled_system_component_ids";
1243
1244// List pref containing the system component ids which are allowed to send
1245// notifications to the message center.
1246extern const char kMessageCenterEnabledSyncNotifierIds[] =
1247    "message_center.enabled_sync_notifier_ids";
1248
1249// *************** LOCAL STATE ***************
1250// These are attached to the machine/installation
1251
1252// Directory of the last profile used.
1253const char kProfileLastUsed[] = "profile.last_used";
1254
1255// List of directories of the profiles last active.
1256const char kProfilesLastActive[] = "profile.last_active_profiles";
1257
1258// Total number of profiles created for this Chrome build. Used to tag profile
1259// directories.
1260const char kProfilesNumCreated[] = "profile.profiles_created";
1261
1262// String containing the version of Chrome that the profile was created by.
1263// If profile was created before this feature was added, this pref will default
1264// to "1.0.0.0".
1265const char kProfileCreatedByVersion[] = "profile.created_by_version";
1266
1267// A map of profile data directory to cached information. This cache can be
1268// used to display information about profiles without actually having to load
1269// them.
1270const char kProfileInfoCache[] = "profile.info_cache";
1271
1272// Prefs for SSLConfigServicePref.
1273const char kCertRevocationCheckingEnabled[] = "ssl.rev_checking.enabled";
1274const char kSSLVersionMin[] = "ssl.version_min";
1275const char kSSLVersionMax[] = "ssl.version_max";
1276const char kCipherSuiteBlacklist[] = "ssl.cipher_suites.blacklist";
1277const char kEnableOriginBoundCerts[] = "ssl.origin_bound_certs.enabled";
1278const char kDisableSSLRecordSplitting[] = "ssl.ssl_record_splitting.disabled";
1279const char kEnableUnrestrictedSSL3Fallback[] =
1280    "ssl.unrestricted_ssl3_fallback.enabled";
1281
1282// A boolean pref of the EULA accepted flag.
1283const char kEulaAccepted[] = "EulaAccepted";
1284
1285// The metrics client GUID, entropy source and session ID.
1286const char kMetricsClientID[] = "user_experience_metrics.client_id";
1287const char kMetricsSessionID[] = "user_experience_metrics.session_id";
1288const char kMetricsLowEntropySource[] =
1289    "user_experience_metrics.low_entropy_source";
1290const char kMetricsPermutedEntropyCache[] =
1291    "user_experience_metrics.permuted_entropy_cache";
1292
1293// Date/time when the current metrics profile ID was created
1294// (which hopefully corresponds to first run).
1295const char kMetricsClientIDTimestamp[] =
1296    "user_experience_metrics.client_id_timestamp";
1297
1298// Boolean that specifies whether or not crash reporting and metrics reporting
1299// are sent over the network for analysis.
1300const char kMetricsReportingEnabled[] =
1301    "user_experience_metrics.reporting_enabled";
1302
1303// Boolean that specifies whether or not crash reports are sent
1304// over the network for analysis.
1305#if defined(OS_ANDROID)
1306const char kCrashReportingEnabled[] =
1307    "user_experience_metrics_crash.reporting_enabled";
1308#endif
1309
1310// Array of strings that are each UMA logs that were supposed to be sent in the
1311// first minute of a browser session. These logs include things like crash count
1312// info, etc.
1313const char kMetricsInitialLogs[] =
1314    "user_experience_metrics.initial_logs_as_protobufs";
1315
1316// Array of strings that are each UMA logs that were not sent because the
1317// browser terminated before these accumulated metrics could be sent.  These
1318// logs typically include histograms and memory reports, as well as ongoing
1319// user activities.
1320const char kMetricsOngoingLogs[] =
1321    "user_experience_metrics.ongoing_logs_as_protobufs";
1322
1323// Boolean that is true when bookmark prompt is enabled.
1324const char kBookmarkPromptEnabled[] = "bookmark_prompt_enabled";
1325
1326// Number of times bookmark prompt displayed.
1327const char kBookmarkPromptImpressionCount[] =
1328    "bookmark_prompt_impression_count";
1329
1330// 64-bit integer serialization of the base::Time from the last successful seed
1331// fetch (i.e. when the Variations server responds with 200 or 304).
1332const char kVariationsLastFetchTime[] = "variations_last_fetch_time";
1333
1334// String for the restrict parameter to be appended to the variations URL.
1335const char kVariationsRestrictParameter[] = "variations_restrict_parameter";
1336
1337// String serialized form of variations seed protobuf.
1338const char kVariationsSeed[] = "variations_seed";
1339
1340// 64-bit integer serialization of the base::Time from the last seed received.
1341const char kVariationsSeedDate[] = "variations_seed_date";
1342
1343// SHA-1 hash of the serialized variations seed data.
1344const char kVariationsSeedHash[] = "variations_seed_hash";
1345
1346// True if the previous run of the program exited cleanly.
1347const char kStabilityExitedCleanly[] =
1348    "user_experience_metrics.stability.exited_cleanly";
1349
1350// Version string of previous run, which is used to assure that stability
1351// metrics reported under current version reflect stability of the same version.
1352const char kStabilityStatsVersion[] =
1353    "user_experience_metrics.stability.stats_version";
1354
1355// Build time, in seconds since an epoch, which is used to assure that stability
1356// metrics reported reflect stability of the same build.
1357const char kStabilityStatsBuildTime[] =
1358    "user_experience_metrics.stability.stats_buildtime";
1359
1360// False if we received a session end and either we crashed during processing
1361// the session end or ran out of time and windows terminated us.
1362const char kStabilitySessionEndCompleted[] =
1363    "user_experience_metrics.stability.session_end_completed";
1364
1365// Number of times the application was launched since last report.
1366const char kStabilityLaunchCount[] =
1367    "user_experience_metrics.stability.launch_count";
1368
1369// Number of times the application exited uncleanly since the last report.
1370const char kStabilityCrashCount[] =
1371    "user_experience_metrics.stability.crash_count";
1372
1373// Number of times the session end did not complete.
1374const char kStabilityIncompleteSessionEndCount[] =
1375    "user_experience_metrics.stability.incomplete_session_end_count";
1376
1377// Number of times a page load event occurred since the last report.
1378const char kStabilityPageLoadCount[] =
1379    "user_experience_metrics.stability.page_load_count";
1380
1381// Number of times a renderer process crashed since the last report.
1382const char kStabilityRendererCrashCount[] =
1383    "user_experience_metrics.stability.renderer_crash_count";
1384
1385// Number of times an extension renderer process crashed since the last report.
1386const char kStabilityExtensionRendererCrashCount[] =
1387    "user_experience_metrics.stability.extension_renderer_crash_count";
1388
1389// Time when the app was last launched, in seconds since the epoch.
1390const char kStabilityLaunchTimeSec[] =
1391    "user_experience_metrics.stability.launch_time_sec";
1392
1393// Time when the app was last known to be running, in seconds since
1394// the epoch.
1395const char kStabilityLastTimestampSec[] =
1396    "user_experience_metrics.stability.last_timestamp_sec";
1397
1398// This is the location of a list of dictionaries of plugin stability stats.
1399const char kStabilityPluginStats[] =
1400    "user_experience_metrics.stability.plugin_stats2";
1401
1402// Number of times the renderer has become non-responsive since the last
1403// report.
1404const char kStabilityRendererHangCount[] =
1405    "user_experience_metrics.stability.renderer_hang_count";
1406
1407// Total number of child process crashes (other than renderer / extension
1408// renderer ones, and plugin children, which are counted separately) since the
1409// last report.
1410const char kStabilityChildProcessCrashCount[] =
1411    "user_experience_metrics.stability.child_process_crash_count";
1412
1413// On Chrome OS, total number of non-Chrome user process crashes
1414// since the last report.
1415const char kStabilityOtherUserCrashCount[] =
1416    "user_experience_metrics.stability.other_user_crash_count";
1417
1418// On Chrome OS, total number of kernel crashes since the last report.
1419const char kStabilityKernelCrashCount[] =
1420    "user_experience_metrics.stability.kernel_crash_count";
1421
1422// On Chrome OS, total number of unclean system shutdowns since the
1423// last report.
1424const char kStabilitySystemUncleanShutdownCount[] =
1425    "user_experience_metrics.stability.system_unclean_shutdowns";
1426
1427// Number of times the browser has been able to register crash reporting.
1428const char kStabilityBreakpadRegistrationSuccess[] =
1429    "user_experience_metrics.stability.breakpad_registration_ok";
1430
1431// Number of times the browser has failed to register crash reporting.
1432const char kStabilityBreakpadRegistrationFail[] =
1433    "user_experience_metrics.stability.breakpad_registration_fail";
1434
1435// Number of times the browser has been run under a debugger.
1436const char kStabilityDebuggerPresent[] =
1437    "user_experience_metrics.stability.debugger_present";
1438
1439// Number of times the browser has not been run under a debugger.
1440const char kStabilityDebuggerNotPresent[] =
1441    "user_experience_metrics.stability.debugger_not_present";
1442
1443// The keys below are used for the dictionaries in the
1444// kStabilityPluginStats list.
1445const char kStabilityPluginName[] = "name";
1446const char kStabilityPluginLaunches[] = "launches";
1447const char kStabilityPluginInstances[] = "instances";
1448const char kStabilityPluginCrashes[] = "crashes";
1449const char kStabilityPluginLoadingErrors[] = "loading_errors";
1450
1451// The keys below are strictly increasing counters over the lifetime of
1452// a chrome installation. They are (optionally) sent up to the uninstall
1453// survey in the event of uninstallation. The installation date is used by some
1454// opt-in services such as Wallet and UMA.
1455const char kInstallDate[] = "uninstall_metrics.installation_date2";
1456const char kUninstallMetricsPageLoadCount[] =
1457    "uninstall_metrics.page_load_count";
1458const char kUninstallLaunchCount[] = "uninstall_metrics.launch_count";
1459const char kUninstallMetricsUptimeSec[] = "uninstall_metrics.uptime_sec";
1460const char kUninstallLastLaunchTimeSec[] =
1461    "uninstall_metrics.last_launch_time_sec";
1462const char kUninstallLastObservedRunTimeSec[] =
1463    "uninstall_metrics.last_observed_running_time_sec";
1464
1465// String containing the version of Chrome for which Chrome will not prompt the
1466// user about setting Chrome as the default browser.
1467const char kBrowserSuppressDefaultBrowserPrompt[] =
1468    "browser.suppress_default_browser_prompt_for_version";
1469
1470// A collection of position, size, and other data relating to the browser
1471// window to restore on startup.
1472const char kBrowserWindowPlacement[] = "browser.window_placement";
1473
1474// A collection of position, size, and other data relating to the task
1475// manager window to restore on startup.
1476const char kTaskManagerWindowPlacement[] = "task_manager.window_placement";
1477
1478// A collection of position, size, and other data relating to the keyword
1479// editor window to restore on startup.
1480const char kKeywordEditorWindowPlacement[] = "keyword_editor.window_placement";
1481
1482// A collection of position, size, and other data relating to the preferences
1483// window to restore on startup.
1484const char kPreferencesWindowPlacement[] = "preferences.window_placement";
1485
1486// An integer specifying the total number of bytes to be used by the
1487// renderer's in-memory cache of objects.
1488const char kMemoryCacheSize[] = "renderer.memory_cache.size";
1489
1490// String which specifies where to download files to by default.
1491const char kDownloadDefaultDirectory[] = "download.default_directory";
1492
1493// Boolean that records if the download directory was changed by an
1494// upgrade a unsafe location to a safe location.
1495const char kDownloadDirUpgraded[] = "download.directory_upgrade";
1496
1497// String which specifies where to save html files to by default.
1498const char kSaveFileDefaultDirectory[] = "savefile.default_directory";
1499
1500// The type used to save the page. See the enum SavePackage::SavePackageType in
1501// the chrome/browser/download/save_package.h for the possible values.
1502const char kSaveFileType[] = "savefile.type";
1503
1504// String which specifies the last directory that was chosen for uploading
1505// or opening a file.
1506const char kSelectFileLastDirectory[] = "selectfile.last_directory";
1507
1508// Boolean that specifies if file selection dialogs are shown.
1509const char kAllowFileSelectionDialogs[] = "select_file_dialogs.allowed";
1510
1511// Map of default tasks, associated by MIME type.
1512const char kDefaultTasksByMimeType[] =
1513    "filebrowser.tasks.default_by_mime_type";
1514
1515// Map of default tasks, associated by file suffix.
1516const char kDefaultTasksBySuffix[] =
1517    "filebrowser.tasks.default_by_suffix";
1518
1519// Extensions which should be opened upon completion.
1520const char kDownloadExtensionsToOpen[] = "download.extensions_to_open";
1521
1522// Integer which specifies the frequency in milliseconds for detecting whether
1523// plugin windows are hung.
1524const char kHungPluginDetectFrequency[] = "browser.hung_plugin_detect_freq";
1525
1526// Integer which specifies the timeout value to be used for SendMessageTimeout
1527// to detect a hung plugin window.
1528const char kPluginMessageResponseTimeout[] =
1529    "browser.plugin_message_response_timeout";
1530
1531// String which represents the dictionary name for our spell-checker.
1532const char kSpellCheckDictionary[] = "spellcheck.dictionary";
1533
1534// Boolean pref indicating whether the spelling confirm dialog has been shown.
1535const char kSpellCheckConfirmDialogShown[] = "spellcheck.confirm_dialog_shown";
1536
1537// String which represents whether we use the spelling service.
1538const char kSpellCheckUseSpellingService[] = "spellcheck.use_spelling_service";
1539
1540// Dictionary of schemes used by the external protocol handler.
1541// The value is true if the scheme must be ignored.
1542const char kExcludedSchemes[] = "protocol_handler.excluded_schemes";
1543
1544// Keys used for MAC handling of SafeBrowsing requests.
1545const char kSafeBrowsingClientKey[] = "safe_browsing.client_key";
1546const char kSafeBrowsingWrappedKey[] = "safe_browsing.wrapped_key";
1547
1548// Integer that specifies the index of the tab the user was on when they
1549// last visited the options window.
1550const char kOptionsWindowLastTabIndex[] = "options_window.last_tab_index";
1551
1552// Integer that specifies the index of the tab the user was on when they
1553// last visited the content settings window.
1554const char kContentSettingsWindowLastTabIndex[] =
1555    "content_settings_window.last_tab_index";
1556
1557// Integer that specifies the index of the tab the user was on when they
1558// last visited the Certificate Manager window.
1559const char kCertificateManagerWindowLastTabIndex[] =
1560    "certificate_manager_window.last_tab_index";
1561
1562// Integer that specifies if the first run bubble should be shown.
1563// This preference is only registered by the first-run procedure.
1564const char kShowFirstRunBubbleOption[] = "show-first-run-bubble-option";
1565
1566// String containing the last known Google URL.  We re-detect this on startup in
1567// most cases, and use it to send traffic to the correct Google host or with the
1568// correct Google domain/country code for whatever location the user is in.
1569const char kLastKnownGoogleURL[] = "browser.last_known_google_url";
1570
1571// String containing the last prompted Google URL to the user.
1572// If the user is using .x TLD for Google URL and gets prompted about .y TLD
1573// for Google URL, and says "no", we should leave the search engine set to .x
1574// but not prompt again until the domain changes away from .y.
1575const char kLastPromptedGoogleURL[] = "browser.last_prompted_google_url";
1576
1577// String containing the last known intranet redirect URL, if any.  See
1578// intranet_redirect_detector.h for more information.
1579const char kLastKnownIntranetRedirectOrigin[] = "browser.last_redirect_origin";
1580
1581// Integer containing the system Country ID the first time we checked the
1582// template URL prepopulate data.  This is used to avoid adding a whole bunch of
1583// new search engine choices if prepopulation runs when the user's Country ID
1584// differs from their previous Country ID.  This pref does not exist until
1585// prepopulation has been run at least once.
1586const char kCountryIDAtInstall[] = "countryid_at_install";
1587// OBSOLETE. Same as above, but uses the Windows-specific GeoID value instead.
1588// Updated if found to the above key.
1589const char kGeoIDAtInstall[] = "geoid_at_install";
1590
1591// An enum value of how the browser was shut down (see browser_shutdown.h).
1592const char kShutdownType[] = "shutdown.type";
1593// Number of processes that were open when the user shut down.
1594const char kShutdownNumProcesses[] = "shutdown.num_processes";
1595// Number of processes that were shut down using the slow path.
1596const char kShutdownNumProcessesSlow[] = "shutdown.num_processes_slow";
1597
1598// Whether to restart the current Chrome session automatically as the last thing
1599// before shutting everything down.
1600const char kRestartLastSessionOnShutdown[] = "restart.last.session.on.shutdown";
1601
1602// Set before autorestarting Chrome, cleared on clean exit.
1603const char kWasRestarted[] = "was.restarted";
1604
1605#if defined(OS_WIN)
1606// On Windows 8 chrome can restart in desktop or in metro mode.
1607const char kRestartSwitchMode[] = "restart.switch_mode";
1608#endif
1609
1610// Placeholder preference for disabling voice / video chat if it is ever added.
1611// Currently, this does not change any behavior.
1612const char kDisableVideoAndChat[] = "disable_video_chat";
1613
1614// Whether Extensions are enabled.
1615const char kDisableExtensions[] = "extensions.disabled";
1616
1617// Whether the plugin finder that lets you install missing plug-ins is enabled.
1618const char kDisablePluginFinder[] = "plugins.disable_plugin_finder";
1619
1620// Integer boolean representing the width (in pixels) of the container for
1621// browser actions.
1622const char kBrowserActionContainerWidth[] =
1623    "extensions.browseractions.container.width";
1624
1625// Time of the last, and next scheduled, extensions auto-update checks.
1626const char kLastExtensionsUpdateCheck[] = "extensions.autoupdate.last_check";
1627const char kNextExtensionsUpdateCheck[] = "extensions.autoupdate.next_check";
1628
1629// Whether we have run the extension-alert system (see ExtensionGlobalError)
1630// at least once for this profile.
1631const char kExtensionAlertsInitializedPref[] = "extensions.alerts.initialized";
1632
1633// The sites that are allowed to install extensions. These sites should be
1634// allowed to install extensions without the scary dangerous downloads bar.
1635// Also, when off-store-extension installs are disabled, these sites are exempt.
1636const char kExtensionAllowedInstallSites[] = "extensions.allowed_install_sites";
1637
1638// A list of allowed extension types. Extensions can only be installed if their
1639// type is on this whitelist or alternatively on kExtensionInstallAllowList or
1640// kExtensionInstallForceList.
1641const char kExtensionAllowedTypes[] = "extensions.allowed_types";
1642
1643// Version number of last blacklist check.
1644const char kExtensionBlacklistUpdateVersion[] =
1645    "extensions.blacklistupdate.version";
1646
1647// A whitelist of extension ids the user can install: exceptions from the
1648// following blacklist.
1649const char kExtensionInstallAllowList[] = "extensions.install.allowlist";
1650
1651// A blacklist, containing extensions the user cannot install. This list can
1652// contain "*" meaning all extensions. This list should not be confused with the
1653// extension blacklist, which is Google controlled.
1654const char kExtensionInstallDenyList[] = "extensions.install.denylist";
1655
1656// A list containing extensions that Chrome will silently install
1657// at startup time. It is a list of strings, each string contains
1658// an extension ID and an update URL, delimited by a semicolon.
1659// This preference is set by an admin policy, and meant to be only
1660// accessed through extensions::ExternalPolicyProvider.
1661const char kExtensionInstallForceList[] = "extensions.install.forcelist";
1662
1663// Indicates on-disk data might have skeletal data that needs to be cleaned
1664// on the next start of the browser.
1665const char kExtensionStorageGarbageCollect[] =
1666    "extensions.storage.garbagecollect";
1667
1668// Keeps track of which sessions are collapsed in the Other Devices menu.
1669const char kNtpCollapsedForeignSessions[] = "ntp.collapsed_foreign_sessions";
1670
1671// New Tab Page URLs that should not be shown as most visited thumbnails.
1672const char kNtpMostVisitedURLsBlacklist[] = "ntp.most_visited_blacklist";
1673
1674// Last time of update of promo_resource_cache.
1675const char kNtpPromoResourceCacheUpdate[] = "ntp.promo_resource_cache_update";
1676
1677// Serves tips for the NTP.
1678const char kNtpTipsResourceServer[] = "ntp.tips_resource_server";
1679
1680// Serves dates to determine display of elements on the NTP.
1681const char kNtpDateResourceServer[] = "ntp.date_resource_server";
1682
1683// Which bookmarks folder should be visible on the new tab page v4.
1684const char kNtpShownBookmarksFolder[] = "ntp.shown_bookmarks_folder";
1685
1686// Which page should be visible on the new tab page v4
1687const char kNtpShownPage[] = "ntp.shown_page";
1688
1689// True if a desktop sync session was found for this user.
1690const char kNtpPromoDesktopSessionFound[] = "ntp.promo_desktop_session_found";
1691
1692// Boolean indicating whether the web store is active for the current locale.
1693const char kNtpWebStoreEnabled[] = "ntp.webstore_enabled";
1694
1695// The id of the last web store promo actually displayed on the NTP.
1696const char kNtpWebStorePromoLastId[] = "ntp.webstore_last_promo_id";
1697
1698// The id of the current web store promo.
1699const char kNtpWebStorePromoId[] = "ntp.webstorepromo.id";
1700
1701// The header line for the NTP web store promo.
1702const char kNtpWebStorePromoHeader[] = "ntp.webstorepromo.header";
1703
1704// The button text for the NTP web store promo.
1705const char kNtpWebStorePromoButton[] = "ntp.webstorepromo.button";
1706
1707// The button link for the NTP web store promo.
1708const char kNtpWebStorePromoLink[] = "ntp.webstorepromo.link";
1709
1710// The image URL for the NTP web store promo logo.
1711const char kNtpWebStorePromoLogo[] = "ntp.webstorepromo.logo";
1712
1713// The original URL for the NTP web store promo logo.
1714const char kNtpWebStorePromoLogoSource[] = "ntp.webstorepromo.logo_source";
1715
1716// The "hide this" link text for the NTP web store promo.
1717const char kNtpWebStorePromoExpire[] = "ntp.webstorepromo.expire";
1718
1719// Specifies what users should maximize the NTP web store promo.
1720const char kNtpWebStorePromoUserGroup[] = "ntp.webstorepromo.usergroup";
1721
1722// Customized app page names that appear on the New Tab Page.
1723const char kNtpAppPageNames[] = "ntp.app_page_names";
1724
1725// A private RSA key for ADB handshake.
1726const char kDevToolsAdbKey[] = "devtools.adb_key";
1727
1728const char kDevToolsDisabled[] = "devtools.disabled";
1729
1730// A string specifying the dock location (either 'bottom' or 'right').
1731const char kDevToolsDockSide[] = "devtools.dock_side";
1732
1733// Maps of files edited locally using DevTools.
1734const char kDevToolsEditedFiles[] = "devtools.edited_files";
1735
1736// List of file system paths added in DevTools.
1737const char kDevToolsFileSystemPaths[] = "devtools.file_system_paths";
1738
1739// Integer location of the horizontal split bar in the browser view.
1740const char kDevToolsHSplitLocation[] = "devtools.split_location";
1741
1742// A boolean specifying whether dev tools window should be opened docked.
1743const char kDevToolsOpenDocked[] = "devtools.open_docked";
1744
1745#if defined(OS_ANDROID)
1746// A boolean specifying whether remote dev tools debugging is enabled.
1747const char kDevToolsRemoteEnabled[] = "devtools.remote_enabled";
1748#endif
1749
1750// Integer location of the vertical split bar in the browser view.
1751const char kDevToolsVSplitLocation[] = "devtools.v_split_location";
1752
1753#if defined(OS_ANDROID) || defined(OS_IOS)
1754// A boolean specifying whether a SPDY proxy is enabled.
1755const char kSpdyProxyAuthEnabled[] = "spdy_proxy.enabled";
1756const char kSpdyProxyAuthWasEnabledBefore[] = "spdy_proxy.was_enabled_before";
1757#endif  // defined(OS_ANDROID) || defined(OS_IOS)
1758
1759// Boolean which stores if the user is allowed to signin to chrome.
1760const char kSigninAllowed[] = "signin.allowed";
1761
1762// 64-bit integer serialization of the base::Time when the last sync occurred.
1763const char kSyncLastSyncedTime[] = "sync.last_synced_time";
1764
1765// Boolean specifying whether the user finished setting up sync.
1766const char kSyncHasSetupCompleted[] = "sync.has_setup_completed";
1767
1768// Boolean specifying whether to automatically sync all data types (including
1769// future ones, as they're added).  If this is true, the following preferences
1770// (kSyncBookmarks, kSyncPasswords, etc.) can all be ignored.
1771const char kSyncKeepEverythingSynced[] = "sync.keep_everything_synced";
1772
1773// Booleans specifying whether the user has selected to sync the following
1774// datatypes.
1775const char kSyncAppNotifications[] = "sync.app_notifications";
1776const char kSyncAppSettings[] = "sync.app_settings";
1777const char kSyncApps[] = "sync.apps";
1778const char kSyncAutofillProfile[] = "sync.autofill_profile";
1779const char kSyncAutofill[] = "sync.autofill";
1780const char kSyncBookmarks[] = "sync.bookmarks";
1781const char kSyncDictionary[] = "sync.dictionary";
1782const char kSyncExtensionSettings[] = "sync.extension_settings";
1783const char kSyncExtensions[] = "sync.extensions";
1784const char kSyncFaviconImages[] = "sync.favicon_images";
1785const char kSyncFaviconTracking[] = "sync.favicon_tracking";
1786const char kSyncHistoryDeleteDirectives[] = "sync.history_delete_directives";
1787const char kSyncManagedUserSettings[] = "sync.managed_user_settings";
1788const char kSyncManagedUsers[] = "sync.managed_users";
1789const char kSyncPasswords[] = "sync.passwords";
1790const char kSyncPreferences[] = "sync.preferences";
1791const char kSyncPriorityPreferences[] = "sync.priority_preferences";
1792const char kSyncSearchEngines[] = "sync.search_engines";
1793const char kSyncSessions[] = "sync.sessions";
1794const char kSyncSyncedNotifications[] = "sync.synced_notifications";
1795const char kSyncTabs[] = "sync.tabs";
1796const char kSyncThemes[] = "sync.themes";
1797const char kSyncTypedUrls[] = "sync.typed_urls";
1798
1799// Boolean used by enterprise configuration management in order to lock down
1800// sync.
1801const char kSyncManaged[] = "sync.managed";
1802
1803// Boolean to prevent sync from automatically starting up.  This is
1804// used when sync is disabled by the user via the privacy dashboard.
1805const char kSyncSuppressStart[] = "sync.suppress_start";
1806
1807// List of the currently acknowledged set of sync types, used to figure out
1808// if a new sync type has rolled out so we can notify the user.
1809const char kSyncAcknowledgedSyncTypes[] = "sync.acknowledged_types";
1810
1811// Dictionary from sync model type (as an int) to max invalidation
1812// version (int64 represented as a string).
1813const char kSyncMaxInvalidationVersions[] = "sync.max_invalidation_versions";
1814
1815// The GUID session sync will use to identify this client, even across sync
1816// disable/enable events.
1817const char kSyncSessionsGUID[] = "sync.session_sync_guid";
1818
1819// An ID to uniquely identify this client to the invalidator service.
1820const char kInvalidatorClientId[] = "invalidator.client_id";
1821
1822// Opaque state from the invalidation subsystem that is persisted via prefs.
1823// The value is base 64 encoded.
1824const char kInvalidatorInvalidationState[] = "invalidator.invalidation_state";
1825
1826// List of {source, name, max invalidation version} tuples. source is an int,
1827// while max invalidation version is an int64; both are stored as string
1828// representations though.
1829const char kInvalidatorMaxInvalidationVersions[] =
1830    "invalidator.max_invalidation_versions";
1831
1832// A string that can be used to restore sync encryption infrastructure on
1833// startup so that the user doesn't need to provide credentials on each start.
1834const char kSyncEncryptionBootstrapToken[] =
1835    "sync.encryption_bootstrap_token";
1836
1837// Same as kSyncEncryptionBootstrapToken, but derived from the keystore key,
1838// so we don't have to do a GetKey command at restart.
1839const char kSyncKeystoreEncryptionBootstrapToken[] =
1840    "sync.keystore_encryption_bootstrap_token";
1841
1842// Boolean tracking whether the user chose to specify a secondary encryption
1843// passphrase.
1844const char kSyncUsingSecondaryPassphrase[] = "sync.using_secondary_passphrase";
1845
1846// String the identifies the last user that logged into sync and other
1847// google services. As opposed to kGoogleServicesUsername, this value is not
1848// cleared on signout, but while the user is signed in the two values will
1849// be the same.
1850const char kGoogleServicesLastUsername[] = "google.services.last_username";
1851
1852// String that identifies the current user logged into sync and other google
1853// services.
1854const char kGoogleServicesUsername[] = "google.services.username";
1855
1856// Local state pref containing a string regex that restricts which accounts
1857// can be used to log in to chrome (e.g. "*@google.com"). If missing or blank,
1858// all accounts are allowed (no restrictions).
1859const char kGoogleServicesUsernamePattern[] =
1860    "google.services.username_pattern";
1861
1862#if !defined(OS_ANDROID)
1863// Tracks the number of times that we have shown the sync promo at startup.
1864const char kSyncPromoStartupCount[] = "sync_promo.startup_count";
1865
1866// Boolean tracking whether the user chose to skip the sync promo.
1867const char kSyncPromoUserSkipped[] = "sync_promo.user_skipped";
1868
1869// Boolean that specifies if the sync promo is allowed to show on first run.
1870// This preference is specified in the master preference file to suppress the
1871// sync promo for some installations.
1872const char kSyncPromoShowOnFirstRunAllowed[] =
1873    "sync_promo.show_on_first_run_allowed";
1874
1875// Boolean that specifies if we should show a bubble in the new tab page.
1876// The bubble is used to confirm that the user is signed into sync.
1877const char kSyncPromoShowNTPBubble[] = "sync_promo.show_ntp_bubble";
1878
1879// An error to show in the sync promo bubble, if needed.  If the sign in was
1880// successful, this property holds an empty string.
1881const char kSyncPromoErrorMessage[] = "sync_promo.error_message";
1882#endif
1883
1884// Time when the user's GAIA info was last updated (represented as an int64).
1885const char kProfileGAIAInfoUpdateTime[] = "profile.gaia_info_update_time";
1886
1887// The URL from which the GAIA profile picture was downloaded. This is cached to
1888// prevent the same picture from being downloaded multiple times.
1889const char kProfileGAIAInfoPictureURL[] = "profile.gaia_info_picture_url";
1890
1891// Create web application shortcut dialog preferences.
1892const char kWebAppCreateOnDesktop[] = "browser.web_app.create_on_desktop";
1893const char kWebAppCreateInAppsMenu[] = "browser.web_app.create_in_apps_menu";
1894const char kWebAppCreateInQuickLaunchBar[] =
1895    "browser.web_app.create_in_quick_launch_bar";
1896
1897// Dictionary that maps Geolocation network provider server URLs to
1898// corresponding access token.
1899const char kGeolocationAccessToken[] = "geolocation.access_token";
1900
1901// Boolean that indicates whether to allow firewall traversal while trying to
1902// establish the initial connection from the client or host.
1903const char kRemoteAccessHostFirewallTraversal[] =
1904    "remote_access.host_firewall_traversal";
1905
1906// Boolean controlling whether 2-factor auth should be required when connecting
1907// to a host (instead of a PIN).
1908const char kRemoteAccessHostRequireTwoFactor[] =
1909    "remote_access.host_require_two_factor";
1910
1911// String containing the domain name that hosts must belong to. If blank, then
1912// hosts can belong to any domain.
1913const char kRemoteAccessHostDomain[] = "remote_access.host_domain";
1914
1915// String containing the domain name of the Chromoting Directory.
1916// Used by Chromoting host and client.
1917const char kRemoteAccessHostTalkGadgetPrefix[] =
1918    "remote_access.host_talkgadget_prefix";
1919
1920// Boolean controlling whether curtaining is required when connecting to a host.
1921const char kRemoteAccessHostRequireCurtain[] =
1922    "remote_access.host_require_curtain";
1923
1924// The last used printer and its settings.
1925const char kPrintPreviewStickySettings[] =
1926    "printing.print_preview_sticky_settings";
1927// The root URL of the cloud print service.
1928const char kCloudPrintServiceURL[] = "cloud_print.service_url";
1929
1930// The URL to use to sign in to cloud print.
1931const char kCloudPrintSigninURL[] = "cloud_print.signin_url";
1932
1933// The last requested size of the dialog as it was closed.
1934const char kCloudPrintDialogWidth[] = "cloud_print.dialog_size.width";
1935const char kCloudPrintDialogHeight[] = "cloud_print.dialog_size.height";
1936const char kCloudPrintSigninDialogWidth[] =
1937    "cloud_print.signin_dialog_size.width";
1938const char kCloudPrintSigninDialogHeight[] =
1939    "cloud_print.signin_dialog_size.height";
1940
1941// The list of BackgroundContents that should be loaded when the browser
1942// launches.
1943const char kRegisteredBackgroundContents[] = "background_contents.registered";
1944
1945#if !defined(OS_ANDROID)
1946// An int that stores how often we've shown the "Chrome is configured to
1947// auto-launch" infobar.
1948const char kShownAutoLaunchInfobar[] = "browser.shown_autolaunch_infobar";
1949#endif
1950
1951// String that lists supported HTTP authentication schemes.
1952const char kAuthSchemes[] = "auth.schemes";
1953
1954// Boolean that specifies whether to disable CNAME lookups when generating
1955// Kerberos SPN.
1956const char kDisableAuthNegotiateCnameLookup[] =
1957    "auth.disable_negotiate_cname_lookup";
1958
1959// Boolean that specifies whether to include the port in a generated Kerberos
1960// SPN.
1961const char kEnableAuthNegotiatePort[] = "auth.enable_negotiate_port";
1962
1963// Whitelist containing servers for which Integrated Authentication is enabled.
1964const char kAuthServerWhitelist[] = "auth.server_whitelist";
1965
1966// Whitelist containing servers Chrome is allowed to do Kerberos delegation
1967// with.
1968const char kAuthNegotiateDelegateWhitelist[] =
1969    "auth.negotiate_delegate_whitelist";
1970
1971// String that specifies the name of a custom GSSAPI library to load.
1972const char kGSSAPILibraryName[] = "auth.gssapi_library_name";
1973
1974// String that specifies the origin allowed to use SpdyProxy
1975// authentication, if any.
1976const char kSpdyProxyAuthOrigin[] = "auth.spdyproxy.origin";
1977
1978// Boolean that specifies whether to allow basic auth prompting on cross-
1979// domain sub-content requests.
1980const char kAllowCrossOriginAuthPrompt[] = "auth.allow_cross_origin_prompt";
1981
1982// Boolean that specifies whether the built-in asynchronous DNS client is used.
1983const char kBuiltInDnsClientEnabled[] = "async_dns.enabled";
1984
1985// An int64 pref that contains the total size of all HTTP content that has been
1986// received from the network.
1987const char kHttpReceivedContentLength[] = "http_received_content_length";
1988
1989// An int64 pref that contains the total original size of all HTTP content that
1990// was received over the network.
1991const char kHttpOriginalContentLength[] = "http_original_content_length";
1992
1993#if defined(OS_ANDROID) || defined(OS_IOS)
1994// A List pref that contains daily totals of the original size of all HTTP
1995// that was received over the network.
1996const char kDailyHttpOriginalContentLength[] =
1997    "data_reduction.daily_original_length";
1998
1999// A List pref that contains daily totals of the size of all HTTP content that
2000// has been received from the network.
2001const char kDailyHttpReceivedContentLength[] =
2002    "data_reduction.daily_received_length";
2003
2004// An int64 pref that contains an internal representation of midnight on the
2005// date of the last update to |kDailyHttp{Original,Received}ContentLength|.
2006const char kDailyHttpContentLengthLastUpdateDate[] =
2007    "data_reduction.last_update_date";
2008#endif  // defined(OS_ANDROID) || defined(OS_IOS)
2009
2010// A pref holding the value of the policy used to explicitly allow or deny
2011// access to audio capture devices.  When enabled or not set, the user is
2012// prompted for device access.  When disabled, access to audio capture devices
2013// is not allowed and no prompt will be shown.
2014// See also kAudioCaptureAllowedUrls.
2015const char kAudioCaptureAllowed[] = "hardware.audio_capture_enabled";
2016// Holds URL patterns that specify URLs that will be granted access to audio
2017// capture devices without prompt.  NOTE: This whitelist is currently only
2018// supported when running in kiosk mode.
2019// TODO(tommi): Update comment when this is supported for all modes.
2020const char kAudioCaptureAllowedUrls[] = "hardware.audio_capture_allowed_urls";
2021
2022// A pref holding the value of the policy used to explicitly allow or deny
2023// access to video capture devices.  When enabled or not set, the user is
2024// prompted for device access.  When disabled, access to video capture devices
2025// is not allowed and no prompt will be shown.
2026const char kVideoCaptureAllowed[] = "hardware.video_capture_enabled";
2027// Holds URL patterns that specify URLs that will be granted access to video
2028// capture devices without prompt.  NOTE: This whitelist is currently only
2029// supported when running in kiosk mode.
2030// TODO(tommi): Update comment when this is supported for all modes.
2031const char kVideoCaptureAllowedUrls[] = "hardware.video_capture_allowed_urls";
2032
2033#if defined(OS_CHROMEOS)
2034// Dictionary for transient storage of settings that should go into device
2035// settings storage before owner has been assigned.
2036const char kDeviceSettingsCache[] = "signed_settings_cache";
2037
2038// The hardware keyboard layout of the device. This should look like
2039// "xkb:us::eng".
2040const char kHardwareKeyboardLayout[] = "intl.hardware_keyboard";
2041
2042// An integer pref which shows number of times carrier deal promo
2043// notification has been shown to user.
2044const char kCarrierDealPromoShown[] =
2045    "settings.internet.mobile.carrier_deal_promo_shown";
2046
2047// A boolean pref of the auto-enrollment decision. Its value is only valid if
2048// it's not the default value; otherwise, no auto-enrollment decision has been
2049// made yet.
2050const char kShouldAutoEnroll[] = "ShouldAutoEnroll";
2051
2052// An integer pref with the maximum number of bits used by the client in a
2053// previous auto-enrollment request. If the client goes through an auto update
2054// during OOBE and reboots into a version of the OS with a larger maximum
2055// modulus, then it will retry auto-enrollment using the updated value.
2056const char kAutoEnrollmentPowerLimit[] = "AutoEnrollmentPowerLimit";
2057
2058// The local state pref that stores device activity times before reporting
2059// them to the policy server.
2060const char kDeviceActivityTimes[] = "device_status.activity_times";
2061
2062// A pref holding the last known location when device location reporting is
2063// enabled.
2064const char kDeviceLocation[] = "device_status.location";
2065
2066// A string that is used to store first-time sync startup after once sync is
2067// disabled. This will be refreshed every sign-in.
2068const char kSyncSpareBootstrapToken[] = "sync.spare_bootstrap_token";
2069
2070// A pref holding the value of the policy used to disable mounting of external
2071// storage for the user.
2072const char kExternalStorageDisabled[] = "hardware.external_storage_disabled";
2073
2074// A pref holding the value of the policy used to disable playing audio on
2075// ChromeOS devices. This pref overrides |kAudioMute| but does not overwrite
2076// it, therefore when the policy is lifted the original mute state is restored.
2077const char kAudioOutputAllowed[] = "hardware.audio_output_enabled";
2078
2079// A dictionary that maps usernames to wallpaper properties.
2080const char kUsersWallpaperInfo[] = "user_wallpaper_info";
2081
2082// Copy of owner swap mouse buttons option to use on login screen.
2083const char kOwnerPrimaryMouseButtonRight[] = "owner.mouse.primary_right";
2084
2085// Copy of owner tap-to-click option to use on login screen.
2086const char kOwnerTapToClickEnabled[] = "owner.touchpad.enable_tap_to_click";
2087
2088// The length of device uptime after which an automatic reboot is scheduled,
2089// expressed in seconds.
2090const char kUptimeLimit[] = "automatic_reboot.uptime_limit";
2091
2092// Whether an automatic reboot should be scheduled when an update has been
2093// applied and a reboot is required to complete the update process.
2094const char kRebootAfterUpdate[] = "automatic_reboot.reboot_after_update";
2095
2096// An any-api scoped refresh token for enterprise-enrolled devices.  Allows
2097// for connection to Google APIs when the user isn't logged in.  Currently used
2098// for for getting a cloudprint scoped token to allow printing in Guest mode,
2099// Public Accounts and kiosks.
2100const char kDeviceRobotAnyApiRefreshToken[] =
2101    "device_robot_refresh_token.any-api";
2102
2103// Device requisition for enterprise enrollment.
2104const char kDeviceEnrollmentRequisition[] = "enrollment.device_requisition";
2105
2106// Whether to automatically start the enterprise enrollment step during OOBE.
2107const char kDeviceEnrollmentAutoStart[] = "enrollment.auto_start";
2108
2109// Whether the user may exit enrollment.
2110const char kDeviceEnrollmentCanExit[] = "enrollment.can_exit";
2111#endif
2112
2113// Whether there is a Flash version installed that supports clearing LSO data.
2114const char kClearPluginLSODataEnabled[] = "browser.clear_lso_data_enabled";
2115
2116// Whether we should show Pepper Flash-specific settings.
2117const char kPepperFlashSettingsEnabled[] =
2118    "browser.pepper_flash_settings_enabled";
2119
2120// String which specifies where to store the disk cache.
2121const char kDiskCacheDir[] = "browser.disk_cache_dir";
2122// Pref name for the policy specifying the maximal cache size.
2123const char kDiskCacheSize[] = "browser.disk_cache_size";
2124// Pref name for the policy specifying the maximal media cache size.
2125const char kMediaCacheSize[] = "browser.media_cache_size";
2126
2127// Specifies the release channel that the device should be locked to.
2128// Possible values: "stable-channel", "beta-channel", "dev-channel", or an
2129// empty string, in which case the value will be ignored.
2130// TODO(dubroy): This preference may not be necessary once
2131// http://crosbug.com/17015 is implemented and the update engine can just
2132// fetch the correct value from the policy.
2133const char kChromeOsReleaseChannel[] = "cros.system.releaseChannel";
2134
2135// Value of the enums in TabStrip::LayoutType as an int.
2136const char kTabStripLayoutType[] = "tab_strip_layout_type";
2137
2138// If true, cloud policy for the user is not loaded when the user signs in.
2139const char kDisableCloudPolicyOnSignin[] =
2140    "policy.disable_cloud_policy_on_signin";
2141
2142// Indicates that factory reset was requested from options page.
2143const char kFactoryResetRequested[] = "FactoryResetRequested";
2144
2145// Boolean recording whether we have showed a balloon that calls out the message
2146// center for desktop notifications.
2147const char kMessageCenterShowedFirstRunBalloon[] =
2148    "message_center.showed_first_run_balloon";
2149
2150// *************** SERVICE PREFS ***************
2151// These are attached to the service process.
2152
2153const char kCloudPrintRoot[] = "cloud_print";
2154const char kCloudPrintProxyEnabled[] = "cloud_print.enabled";
2155// The unique id for this instance of the cloud print proxy.
2156const char kCloudPrintProxyId[] = "cloud_print.proxy_id";
2157// The GAIA auth token for Cloud Print
2158const char kCloudPrintAuthToken[] = "cloud_print.auth_token";
2159// The GAIA auth token used by Cloud Print to authenticate with the XMPP server
2160// This should eventually go away because the above token should work for both.
2161const char kCloudPrintXMPPAuthToken[] = "cloud_print.xmpp_auth_token";
2162// The email address of the account used to authenticate with the Cloud Print
2163// server.
2164const char kCloudPrintEmail[] = "cloud_print.email";
2165// Settings specific to underlying print system.
2166const char kCloudPrintPrintSystemSettings[] =
2167    "cloud_print.print_system_settings";
2168// A boolean indicating whether we should poll for print jobs when don't have
2169// an XMPP connection (false by default).
2170const char kCloudPrintEnableJobPoll[] = "cloud_print.enable_job_poll";
2171const char kCloudPrintRobotRefreshToken[] = "cloud_print.robot_refresh_token";
2172const char kCloudPrintRobotEmail[] = "cloud_print.robot_email";
2173// A boolean indicating whether we should connect to cloud print new printers.
2174const char kCloudPrintConnectNewPrinters[] =
2175    "cloud_print.user_settings.connectNewPrinters";
2176// A boolean indicating whether we should ping XMPP connection.
2177const char kCloudPrintXmppPingEnabled[] = "cloud_print.xmpp_ping_enabled";
2178// An int value indicating the average timeout between xmpp pings.
2179const char kCloudPrintXmppPingTimeout[] = "cloud_print.xmpp_ping_timeout_sec";
2180// Dictionary with settings stored by connector setup page.
2181const char kCloudPrintUserSettings[] = "cloud_print.user_settings";
2182// List of printers settings.
2183extern const char kCloudPrintPrinters[] = "cloud_print.user_settings.printers";
2184// A boolean indicating whether submitting jobs to Google Cloud Print is
2185// blocked by policy.
2186const char kCloudPrintSubmitEnabled[] = "cloud_print.submit_enabled";
2187
2188// Preference to store proxy settings.
2189const char kProxy[] = "proxy";
2190const char kMaxConnectionsPerProxy[] = "net.max_connections_per_proxy";
2191
2192// Preferences that are exclusively used to store managed values for default
2193// content settings.
2194const char kManagedDefaultCookiesSetting[] =
2195    "profile.managed_default_content_settings.cookies";
2196const char kManagedDefaultImagesSetting[] =
2197    "profile.managed_default_content_settings.images";
2198const char kManagedDefaultJavaScriptSetting[] =
2199    "profile.managed_default_content_settings.javascript";
2200const char kManagedDefaultPluginsSetting[] =
2201    "profile.managed_default_content_settings.plugins";
2202const char kManagedDefaultPopupsSetting[] =
2203    "profile.managed_default_content_settings.popups";
2204const char kManagedDefaultGeolocationSetting[] =
2205    "profile.managed_default_content_settings.geolocation";
2206const char kManagedDefaultNotificationsSetting[] =
2207    "profile.managed_default_content_settings.notifications";
2208const char kManagedDefaultMediaStreamSetting[] =
2209    "profile.managed_default_content_settings.media_stream";
2210
2211// Preferences that are exclusively used to store managed
2212// content settings patterns.
2213const char kManagedCookiesAllowedForUrls[] =
2214    "profile.managed_cookies_allowed_for_urls";
2215const char kManagedCookiesBlockedForUrls[] =
2216    "profile.managed_cookies_blocked_for_urls";
2217const char kManagedCookiesSessionOnlyForUrls[] =
2218    "profile.managed_cookies_sessiononly_for_urls";
2219const char kManagedImagesAllowedForUrls[] =
2220    "profile.managed_images_allowed_for_urls";
2221const char kManagedImagesBlockedForUrls[] =
2222    "profile.managed_images_blocked_for_urls";
2223const char kManagedJavaScriptAllowedForUrls[] =
2224    "profile.managed_javascript_allowed_for_urls";
2225const char kManagedJavaScriptBlockedForUrls[] =
2226    "profile.managed_javascript_blocked_for_urls";
2227const char kManagedPluginsAllowedForUrls[] =
2228    "profile.managed_plugins_allowed_for_urls";
2229const char kManagedPluginsBlockedForUrls[] =
2230    "profile.managed_plugins_blocked_for_urls";
2231const char kManagedPopupsAllowedForUrls[] =
2232    "profile.managed_popups_allowed_for_urls";
2233const char kManagedPopupsBlockedForUrls[] =
2234    "profile.managed_popups_blocked_for_urls";
2235const char kManagedNotificationsAllowedForUrls[] =
2236    "profile.managed_notifications_allowed_for_urls";
2237const char kManagedNotificationsBlockedForUrls[] =
2238    "profile.managed_notifications_blocked_for_urls";
2239const char kManagedAutoSelectCertificateForUrls[] =
2240    "profile.managed_auto_select_certificate_for_urls";
2241
2242#if defined(OS_MACOSX)
2243// Set to true if the user removed our login item so we should not create a new
2244// one when uninstalling background apps.
2245const char kUserRemovedLoginItem[] = "background_mode.user_removed_login_item";
2246
2247// Set to true if Chrome already created a login item, so there's no need to
2248// create another one.
2249const char kChromeCreatedLoginItem[] =
2250  "background_mode.chrome_created_login_item";
2251
2252// Set to true once we've initialized kChromeCreatedLoginItem for the first
2253// time.
2254const char kMigratedLoginItemPref[] =
2255  "background_mode.migrated_login_item_pref";
2256#endif
2257
2258// Set to true if background mode is enabled on this browser.
2259const char kBackgroundModeEnabled[] = "background_mode.enabled";
2260
2261// Set to true if hardware acceleration mode is enabled on this browser.
2262const char kHardwareAccelerationModeEnabled[] =
2263  "hardware_acceleration_mode.enabled";
2264
2265// Hardware acceleration mode from previous browser launch.
2266const char kHardwareAccelerationModePrevious[] =
2267  "hardware_acceleration_mode_previous";
2268
2269// List of protocol handlers.
2270const char kRegisteredProtocolHandlers[] =
2271  "custom_handlers.registered_protocol_handlers";
2272
2273// List of protocol handlers the user has requested not to be asked about again.
2274const char kIgnoredProtocolHandlers[] =
2275  "custom_handlers.ignored_protocol_handlers";
2276
2277// Whether user-specified handlers for protocols and content types can be
2278// specified.
2279const char kCustomHandlersEnabled[] = "custom_handlers.enabled";
2280
2281// Integers that specify the policy refresh rate for device- and user-policy in
2282// milliseconds. Not all values are meaningful, so it is clamped to a sane range
2283// by the cloud policy subsystem.
2284const char kDevicePolicyRefreshRate[] = "policy.device_refresh_rate";
2285const char kUserPolicyRefreshRate[] = "policy.user_refresh_rate";
2286
2287// String that represents the recovery component last downloaded version. This
2288// takes the usual 'a.b.c.d' notation.
2289const char kRecoveryComponentVersion[] = "recovery_component.version";
2290
2291// String that stores the component updater last known state. This is used for
2292// troubleshooting.
2293const char kComponentUpdaterState[] = "component_updater.state";
2294
2295// The next media gallery ID to assign.
2296const char kMediaGalleriesUniqueId[] = "media_galleries.gallery_id";
2297
2298// A list of dictionaries, where each dictionary represents a known media
2299// gallery.
2300const char kMediaGalleriesRememberedGalleries[] =
2301    "media_galleries.remembered_galleries";
2302
2303#if defined(USE_ASH)
2304// |kShelfAlignment| and |kShelfAutoHideBehavior| have a local variant. The
2305// local variant is not synced and is used if set. If the local variant is not
2306// set its value is set from the synced value (once prefs have been
2307// synced). This gives a per-machine setting that is initialized from the last
2308// set value.
2309// These values are default on the machine but can be overridden by per-display
2310// values in kShelfPreferences (unless overridden by managed policy).
2311// String value corresponding to ash::Shell::ShelfAlignment.
2312const char kShelfAlignment[] = "shelf_alignment";
2313const char kShelfAlignmentLocal[] = "shelf_alignment_local";
2314// String value corresponding to ash::Shell::ShelfAutoHideBehavior.
2315const char kShelfAutoHideBehavior[] = "auto_hide_behavior";
2316const char kShelfAutoHideBehaviorLocal[] = "auto_hide_behavior_local";
2317// This value stores chrome icon's index in the launcher. This should be handled
2318// separately with app shortcut's index because of LauncherModel's backward
2319// compatability. If we add chrome icon index to |kPinnedLauncherApps|, its
2320// index is also stored in the |kPinnedLauncherApp| pref. It may causes
2321// creating two chrome icons.
2322const char kShelfChromeIconIndex[] = "shelf_chrome_icon_index";
2323
2324const char kPinnedLauncherApps[] = "pinned_launcher_apps";
2325// Boolean value indicating whether to show a logout button in the ash tray.
2326const char kShowLogoutButtonInTray[] = "show_logout_button_in_tray";
2327// Dictionary value that holds per-display preference of shelf alignment and
2328// auto-hide behavior. Key of the dictionary is the id of the display, and
2329// its value is a dictionary whose keys are kShelfAlignment and
2330// kShelfAutoHideBehavior.
2331const char kShelfPreferences[] = "shelf_preferences";
2332
2333// Tuning for immersive fullscreen.
2334const char kImmersiveModeRevealDelayMs[] =
2335    "immersive_mode.reveal_delay_ms";
2336const char kImmersiveModeRevealXThresholdPixels[] =
2337    "immersive_mode.reveal_x_threshold_pixels";
2338
2339// Tuning settings for the animations when a user is cycling through workspaces
2340// via a three finger vertical scroll.
2341const char kWorkspaceCyclerShallowerThanSelectedYOffsets[] =
2342    "workspace_cycler.shallower_than_selected_y_offsets";
2343const char kWorkspaceCyclerDeeperThanSelectedYOffsets[] =
2344    "workspace_cycler.deeper_than_selected_y_offsets";
2345const char kWorkspaceCyclerSelectedYOffset[] =
2346    "workspace_cycler.selected_y_offset";
2347const char kWorkspaceCyclerSelectedScale[] =
2348    "workspace_cycler.selected_scale";
2349const char kWorkspaceCyclerMinScale[] =
2350    "workspace_cycler.min_scale";
2351const char kWorkspaceCyclerMaxScale[] =
2352    "workspace_cycler.max_scale";
2353const char kWorkspaceCyclerMinBrightness[] =
2354    "workspace_cycler.min_brightness";
2355const char kWorkspaceCyclerBackgroundOpacity[] =
2356    "workspace_cycler.background_opacity";
2357const char kWorkspaceCyclerDesktopWorkspaceBrightness[] =
2358    "workspace_cycler.desktop_workspace_brightness";
2359const char kWorkspaceCyclerDistanceToInitiateCycling[] =
2360    "workspace_cycler.distance_to_initiate_cycling";
2361const char kWorkspaceCyclerScrollDistanceToCycleToNextWorkspace[] =
2362    "workspace_cycler.scroll_distance_to_cycle_to_next_workspace";
2363const char kWorkspaceCyclerCyclerStepAnimationDurationRatio[] =
2364    "workspace_cycler.cycler_step_animation_duration_ratio";
2365const char kWorkspaceCyclerStartCyclerAnimationDuration[] =
2366    "workspace_cycler.start_cycler_animation_duration";
2367const char kWorkspaceCyclerStopCyclerAnimationDuration[] =
2368    "workspace_cycler.stop_cycler_animation_duration";
2369#endif
2370
2371#if defined(USE_AURA)
2372// Tuning settings for gestures.
2373const char kFlingVelocityCap[] = "gesture.fling_velocity_cap";
2374const char kLongPressTimeInSeconds[] =
2375    "gesture.long_press_time_in_seconds";
2376const char kMaxDistanceBetweenTapsForDoubleTap[] =
2377    "gesture.max_distance_between_taps_for_double_tap";
2378const char kMaxDistanceForTwoFingerTapInPixels[] =
2379    "gesture.max_distance_for_two_finger_tap_in_pixels";
2380const char kMaxSecondsBetweenDoubleClick[] =
2381    "gesture.max_seconds_between_double_click";
2382const char kMaxSeparationForGestureTouchesInPixels[] =
2383    "gesture.max_separation_for_gesture_touches_in_pixels";
2384const char kMaxSwipeDeviationRatio[] =
2385    "gesture.max_swipe_deviation_ratio";
2386const char kMaxTouchDownDurationInSecondsForClick[] =
2387    "gesture.max_touch_down_duration_in_seconds_for_click";
2388const char kMaxTouchMoveInPixelsForClick[] =
2389    "gesture.max_touch_move_in_pixels_for_click";
2390const char kMinDistanceForPinchScrollInPixels[] =
2391    "gesture.min_distance_for_pinch_scroll_in_pixels";
2392const char kMinFlickSpeedSquared[] =
2393    "gesture.min_flick_speed_squared";
2394const char kMinPinchUpdateDistanceInPixels[] =
2395    "gesture.min_pinch_update_distance_in_pixels";
2396const char kMinRailBreakVelocity[] =
2397    "gesture.min_rail_break_velocity";
2398const char kMinScrollDeltaSquared[] =
2399    "gesture.min_scroll_delta_squared";
2400const char kMinSwipeSpeed[] =
2401    "gesture.min_swipe_speed";
2402const char kMinTouchDownDurationInSecondsForClick[] =
2403    "gesture.min_touch_down_duration_in_seconds_for_click";
2404const char kPointsBufferedForVelocity[] =
2405    "gesture.points_buffered_for_velocity";
2406const char kRailBreakProportion[] =
2407    "gesture.rail_break_proportion";
2408const char kRailStartProportion[] =
2409    "gesture.rail_start_proportion";
2410const char kScrollPredictionSeconds[] =
2411    "gesture.scroll_prediction_seconds";
2412const char kSemiLongPressTimeInSeconds[] =
2413    "gesture.semi_long_press_time_in_seconds";
2414const char kTabScrubActivationDelayInMS[] =
2415    "gesture.tab_scrub_activation_delay_in_ms";
2416const char kFlingAccelerationCurveCoefficient0[] =
2417    "gesture.fling_acceleration_curve_coefficient_0";
2418const char kFlingAccelerationCurveCoefficient1[] =
2419    "gesture.fling_acceleration_curve_coefficient_1";
2420const char kFlingAccelerationCurveCoefficient2[] =
2421    "gesture.fling_acceleration_curve_coefficient_2";
2422const char kFlingAccelerationCurveCoefficient3[] =
2423    "gesture.fling_acceleration_curve_coefficient_3";
2424const char kFlingCurveTouchpadAlpha[] = "flingcurve.touchpad_alpha";
2425const char kFlingCurveTouchpadBeta[] = "flingcurve.touchpad_beta";
2426const char kFlingCurveTouchpadGamma[] = "flingcurve.touchpad_gamma";
2427const char kFlingCurveTouchscreenAlpha[] = "flingcurve.touchscreen_alpha";
2428const char kFlingCurveTouchscreenBeta[] = "flingcurve.touchscreen_beta";
2429const char kFlingCurveTouchscreenGamma[] = "flingcurve.touchscreen_gamma";
2430const char kFlingMaxCancelToDownTimeInMs[] =
2431    "gesture.fling_max_cancel_to_down_time_in_ms";
2432const char kFlingMaxTapGapTimeInMs[] =
2433    "gesture.fling_max_tap_gap_time_in_ms";
2434const char kOverscrollHorizontalThresholdComplete[] =
2435    "overscroll.horizontal_threshold_complete";
2436const char kOverscrollVerticalThresholdComplete[] =
2437    "overscroll.vertical_threshold_complete";
2438const char kOverscrollMinimumThresholdStart[] =
2439    "overscroll.minimum_threshold_start";
2440const char kOverscrollHorizontalResistThreshold[] =
2441    "overscroll.horizontal_resist_threshold";
2442const char kOverscrollVerticalResistThreshold[] =
2443    "overscroll.vertical_resist_threshold";
2444#endif
2445
2446// Counts how many more times the 'profile on a network share' warning should be
2447// shown to the user before the next silence period.
2448const char kNetworkProfileWarningsLeft[] = "network_profile.warnings_left";
2449// Tracks the time of the last shown warning. Used to reset
2450// |network_profile.warnings_left| after a silence period.
2451const char kNetworkProfileLastWarningTime[] =
2452    "network_profile.last_warning_time";
2453
2454// 64-bit serialization of the time last policy usage statistics were collected
2455// by UMA_HISTOGRAM_ENUMERATION.
2456const char kLastPolicyStatisticsUpdate[] = "policy.last_statistics_update";
2457
2458#if defined(OS_CHROMEOS)
2459// The RLZ brand code, if enabled.
2460const char kRLZBrand[] = "rlz.brand";
2461// Whether RLZ pings are disabled.
2462const char kRLZDisabled[] = "rlz.disabled";
2463#endif
2464
2465// The directory in user data dir that contains the profile to be used with the
2466// app launcher.
2467extern const char kAppListProfile[] = "app_list.profile";
2468
2469// Whether to show the app list on a browser relaunch. Used when switching out
2470// of metro mode after a user gesture requests showing the app list.
2471const char kRestartWithAppList[] = "app_list.show_on_relaunch";
2472
2473// The number of times the app launcher was launched since last ping and
2474// the time of the last ping.
2475extern const char kAppListLaunchCount[] = "app_list.launch_count";
2476extern const char kLastAppListLaunchPing[] = "app_list.last_launch_ping";
2477
2478// The number of times the an app was launched from the app launcher since last
2479// ping and the time of the last ping.
2480extern const char kAppListAppLaunchCount[] = "app_list.app_launch_count";
2481extern const char kLastAppListAppLaunchPing[] = "app_list.last_app_launch_ping";
2482
2483// How often the bubble has been shown.
2484extern const char kModuleConflictBubbleShown[] = "module_conflict.bubble_shown";
2485
2486// A string pref for storing the salt used to compute the pepper device ID.
2487const char kDRMSalt[] = "settings.privacy.drm_salt";
2488// A boolean pref that enables the (private) pepper GetDeviceID() call.
2489const char kEnableDRM[] = "settings.privacy.drm_enabled";
2490
2491}  // namespace prefs
2492