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