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