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