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