pref_names.cc revision 3345a6884c488ff3a535c2c9acdd33d74b37e311
1// Copyright (c) 2010 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
7namespace prefs {
8
9// *************** PROFILE PREFS ***************
10// These are attached to the user profile
11
12// A boolean specifying whether the New Tab page is the home page or not.
13const char kHomePageIsNewTabPage[] = "homepage_is_newtabpage";
14
15// This is the URL of the page to load when opening new tabs.
16const char kHomePage[] = "homepage";
17
18// Used to determine if the last session exited cleanly. Set to false when
19// first opened, and to true when closing. On startup if the value is false,
20// it means the profile didn't exit cleanly.
21const char kSessionExitedCleanly[] = "profile.exited_cleanly";
22
23// An integer pref. Holds one of several values:
24// 0: (or empty) don't do anything special on startup.
25// 1: restore the last session.
26// 2: this was used to indicate a specific session should be restored. It is
27//    no longer used, but saved to avoid conflict with old preferences.
28// 3: unused, previously indicated the user wants to restore a saved session.
29// 4: restore the URLs defined in kURLsToRestoreOnStartup.
30const char kRestoreOnStartup[] = "session.restore_on_startup";
31
32// The URLs to restore on startup or when the home button is pressed. The URLs
33// are only restored on startup if kRestoreOnStartup is 4.
34const char kURLsToRestoreOnStartup[] = "session.urls_to_restore_on_startup";
35
36// The application locale.
37const char kApplicationLocale[] = "intl.app_locale";
38
39// The default character encoding to assume for a web page in the
40// absence of MIME charset specification
41const char kDefaultCharset[] = "intl.charset_default";
42
43// The value to use for Accept-Languages HTTP header when making an HTTP
44// request.
45const char kAcceptLanguages[] = "intl.accept_languages";
46
47// The value to use for showing locale-dependent encoding list for different
48// locale, it's initialized from the corresponding string resource that is
49// stored in non-translatable part of the resource bundle.
50const char kStaticEncodings[] = "intl.static_encodings";
51
52// OBSOLETE.  The list of hostnames for which we whitelist popups (rather than
53// blocking).
54const char kPopupWhitelistedHosts[] = "profile.popup_whitelisted_sites";
55
56// WebKit preferences.
57// A boolean flag to indicate whether WebKit standard font family is
58// serif or sans-serif. We don't have a UI for setting standard family.
59// Instead, we use this pref to map either serif or sans_serif to WebKit
60// standard font family. At the moment, we don't have a UI for this
61// flag, either.
62const char kWebKitStandardFontIsSerif[] =
63    "webkit.webprefs.standard_font_is_serif";
64const char kWebKitFixedFontFamily[] = "webkit.webprefs.fixed_font_family";
65const char kWebKitSerifFontFamily[] = "webkit.webprefs.serif_font_family";
66const char kWebKitSansSerifFontFamily[] =
67    "webkit.webprefs.sansserif_font_family";
68const char kWebKitCursiveFontFamily[] = "webkit.webprefs.cursive_font_family";
69const char kWebKitFantasyFontFamily[] = "webkit.webprefs.fantasy_font_family";
70const char kWebKitDefaultFontSize[] = "webkit.webprefs.default_font_size";
71const char kWebKitDefaultFixedFontSize[] =
72    "webkit.webprefs.default_fixed_font_size";
73const char kWebKitMinimumFontSize[] = "webkit.webprefs.minimum_font_size";
74const char kWebKitMinimumLogicalFontSize[] =
75    "webkit.webprefs.minimum_logical_font_size";
76const char kWebKitJavascriptEnabled[] = "webkit.webprefs.javascript_enabled";
77const char kWebKitWebSecurityEnabled[] = "webkit.webprefs.web_security_enabled";
78const char kWebKitJavascriptCanOpenWindowsAutomatically[] =
79    "webkit.webprefs.javascript_can_open_windows_automatically";
80const char kWebKitLoadsImagesAutomatically[] =
81    "webkit.webprefs.loads_images_automatically";
82const char kWebKitPluginsEnabled[] = "webkit.webprefs.plugins_enabled";
83const char kWebKitDomPasteEnabled[] = "webkit.webprefs.dom_paste_enabled";
84const char kWebKitShrinksStandaloneImagesToFit[] =
85    "webkit.webprefs.shrinks_standalone_images_to_fit";
86const char kWebKitInspectorSettings[] = "webkit.webprefs.inspector_settings";
87const char kWebKitUsesUniversalDetector[] =
88    "webkit.webprefs.uses_universal_detector";
89const char kWebKitTextAreasAreResizable[] =
90    "webkit.webprefs.text_areas_are_resizable";
91const char kWebKitJavaEnabled[] = "webkit.webprefs.java_enabled";
92const char kWebkitTabsToLinks[] = "webkit.webprefs.tabs_to_links";
93
94// Boolean which specifies whether the bookmark bar is visible on all tabs.
95const char kShowBookmarkBar[] = "bookmark_bar.show_on_all_tabs";
96
97// Boolean that is true if the password manager is on (will record new
98// passwords and fill in known passwords).
99const char kPasswordManagerEnabled[] = "profile.password_manager_enabled";
100
101// Boolean controlling whether the password manager allows to retrieve passwords
102// in clear text.
103const char kPasswordManagerAllowShowPasswords[] =
104    "profile.password_manager_allow_show_passwords";
105
106// OBSOLETE.  Boolean that is true if the form AutoFill is on (will record
107// values entered in text inputs in forms and shows them in a popup when user
108// type in a text input with the same name later on).  This has been superseded
109// by kAutoFillEnabled.
110const char kFormAutofillEnabled[] = "profile.form_autofill_enabled";
111
112// Boolean that is true when SafeBrowsing is enabled.
113const char kSafeBrowsingEnabled[] = "safebrowsing.enabled";
114
115// Boolean that is true when Suggest support is enabled.
116const char kSearchSuggestEnabled[] = "search.suggest_enabled";
117
118// OBSOLETE.  Enum that specifies whether to enforce a third-party cookie
119// blocking policy.  This has been superseded by kDefaultContentSettings +
120// kBlockThirdPartyCookies.
121// 0 - allow all cookies.
122// 1 - block third-party cookies
123// 2 - block all cookies
124const char kCookieBehavior[] = "security.cookie_behavior";
125
126// The URL (as understood by TemplateURLRef) the default search provider uses
127// for searches.
128const char kDefaultSearchProviderSearchURL[] =
129    "default_search_provider.search_url";
130
131// The URL (as understood by TemplateURLRef) the default search provider uses
132// for suggestions.
133const char kDefaultSearchProviderSuggestURL[] =
134    "default_search_provider.suggest_url";
135
136// The Fav Icon URL (as understood by TemplateURLRef) of the default search
137// provider.
138const char kDefaultSearchProviderIconURL[] =
139    "default_search_provider.icon_url";
140
141// The input encoding (as understood by TemplateURLRef) supported by the default
142// search provider.  The various encodings are separated by ';'
143const char kDefaultSearchProviderEncodings[] =
144    "default_search_provider.encodings";
145
146// The name of the default search provider.
147const char kDefaultSearchProviderName[] = "default_search_provider.name";
148
149// The keyword of the default search provider.
150const char kDefaultSearchProviderKeyword[] = "default_search_provider.keyword";
151
152// The id of the default search provider.
153const char kDefaultSearchProviderID[] = "default_search_provider.id";
154
155// The prepopulate id of the default search provider.
156const char kDefaultSearchProviderPrepopulateID[] =
157    "default_search_provider.prepopulate_id";
158
159// The dictionary key used when the default search providers are given
160// in the preferences file. Normally they are copied from the master
161// preferences file.
162const char kSearchProviderOverrides[] = "search_provider_overrides";
163// The format version for the dictionary above.
164const char kSearchProviderOverridesVersion[] =
165    "search_provider_overrides_version";
166
167// Boolean which specifies whether we should ask the user if we should download
168// a file (true) or just download it automatically.
169const char kPromptForDownload[] = "download.prompt_for_download";
170
171// A boolean pref set to true if we're using Link Doctor error pages.
172const char kAlternateErrorPagesEnabled[] = "alternate_error_pages.enabled";
173
174// A boolean pref set to true if DNS pre-fetching is being done in browser.
175const char kDnsPrefetchingEnabled[] = "dns_prefetching.enabled";
176
177// An adaptively identified list of domain names to be pre-fetched during the
178// next startup, based on what was actually needed during this startup.
179const char kDnsStartupPrefetchList[] = "StartupDNSPrefetchList";
180
181// A list of host names used to fetch web pages, and their commonly used
182// sub-resource hostnames (and expected latency benefits from pre-resolving, or
183// preconnecting to, such sub-resource hostnames).
184// This list is adaptively grown and pruned.
185const char kDnsHostReferralList[] = "HostReferralList";
186
187// Is the cookie prompt expanded?
188const char kCookiePromptExpanded[] = "cookieprompt.expanded";
189
190#if defined(USE_NSS)
191// Prefs for SSLConfigServicePref.  Currently, these are only present on
192// and used by NSS-using OSes.
193const char kCertRevocationCheckingEnabled[] = "ssl.rev_checking.enabled";
194const char kSSL2Enabled[] = "ssl.ssl2.enabled";
195const char kSSL3Enabled[] = "ssl.ssl3.enabled";
196const char kTLS1Enabled[] = "ssl.tls1.enabled";
197#endif
198
199#if defined(OS_CHROMEOS)
200// A boolean pref set to true if TapToClick is being done in browser.
201const char kTapToClickEnabled[] = "settings.touchpad.enable_tap_to_click";
202
203// A integer pref for the touchpad sensitivity.
204const char kTouchpadSensitivity[] = "settings.touchpad.sensitivity2";
205
206// A string pref set to the current input method.
207const char kLanguageCurrentInputMethod[] =
208    "settings.language.current_input_method";
209
210// A string pref set to the previous input method.
211const char kLanguagePreviousInputMethod[] =
212    "settings.language.previous_input_method";
213
214// A string pref (comma-separated list) set to the "next engine in menu"
215// hot-key lists.
216const char kLanguageHotkeyNextEngineInMenu[] =
217    "settings.language.hotkey_next_engine_in_menu";
218
219// A string pref (comma-separated list) set to the "previous engine"
220// hot-key lists.
221const char kLanguageHotkeyPreviousEngine[] =
222    "settings.language.hotkey_previous_engine";
223
224// A string pref (comma-separated list) set to the preferred language IDs
225// (ex. "en-US,fr,ko").
226const char kLanguagePreferredLanguages[] =
227    "settings.language.preferred_languages";
228
229// A string pref (comma-separated list) set to the preloaded (active) input
230// method IDs (ex. "pinyin,mozc").
231const char kLanguagePreloadEngines[] = "settings.language.preload_engines";
232
233// Boolean prefs for ibus-chewing Chinese input method.
234const char kLanguageChewingAutoShiftCur[] =
235    "settings.language.chewing_auto_shift_cur";
236const char kLanguageChewingAddPhraseDirection[] =
237    "settings.language.chewing_add_phrase_direction";
238const char kLanguageChewingEasySymbolInput[] =
239    "settings.language.chewing_easy_symbol_input";
240const char kLanguageChewingEscCleanAllBuf[] =
241    "settings.language.chewing_esc_clean_all_buf";
242const char kLanguageChewingForceLowercaseEnglish[] =
243    "settings.language.chewing_force_lowercase_english";
244const char kLanguageChewingPlainZhuyin[] =
245    "settings.language.chewing_plain_zhuyin";
246const char kLanguageChewingPhraseChoiceRearward[] =
247    "settings.language.chewing_phrase_choice_rearward";
248const char kLanguageChewingSpaceAsSelection[] =
249    "settings.language.chewing_space_as_selection";
250
251// Integer prefs for ibus-chewing Chinese input method.
252const char kLanguageChewingMaxChiSymbolLen[] =
253    "settings.language.chewing_max_chi_symbol_len";
254const char kLanguageChewingCandPerPage[] =
255    "settings.language.chewing_cand_per_page";
256
257// String prefs for ibus-chewing Chinese input method.
258const char kLanguageChewingKeyboardType[] =
259    "settings.language.chewing_keyboard_type";
260const char kLanguageChewingSelKeys[] =
261    "settings.language.chewing_sel_keys";
262
263const char kLanguageChewingHsuSelKeyType[] =
264    "settings.language.chewing_hsu_sel_key_type";
265
266// A string pref which determines the keyboard layout for Hangul input method.
267const char kLanguageHangulKeyboard[] = "settings.language.hangul_keyboard";
268const char kLanguageHangulHanjaKeys[] = "settings.language.hangul_hanja_keys";
269
270// A boolean prefs for ibus-pinyin Chinese input method.
271const char kLanguagePinyinCorrectPinyin[] =
272    "settings.language.pinyin_correct_pinyin";
273const char kLanguagePinyinFuzzyPinyin[] =
274    "settings.language.pinyin_fuzzy_pinyin";
275const char kLanguagePinyinShiftSelectCandidate[] =
276    "settings.language.pinyin_shift_select_candidate";
277const char kLanguagePinyinMinusEqualPage[] =
278    "settings.language.pinyin_minus_equal_page";
279const char kLanguagePinyinCommaPeriodPage[] =
280    "settings.language.pinyin_comma_period_page";
281const char kLanguagePinyinAutoCommit[] =
282    "settings.language.pinyin_auto_commit";
283const char kLanguagePinyinDoublePinyin[] =
284    "settings.language.pinyin_double_pinyin";
285const char kLanguagePinyinInitChinese[] =
286    "settings.language.pinyin_init_chinese";
287const char kLanguagePinyinInitFull[] =
288    "settings.language.pinyin_init_full";
289const char kLanguagePinyinInitFullPunct[] =
290    "settings.language.pinyin_init_full_punct";
291const char kLanguagePinyinInitSimplifiedChinese[] =
292    "settings.language.pinyin_init_simplified_chinese";
293const char kLanguagePinyinTradCandidate[] =
294    "settings.language.pinyin_trad_candidate";
295
296// A integer prefs for ibus-pinyin Chinese input method.
297const char kLanguagePinyinDoublePinyinSchema[] =
298    "settings.language.pinyin_double_pinyin_schema";
299const char kLanguagePinyinLookupTablePageSize[] =
300    "settings.language.pinyin_lookup_table_page_size";
301
302// A string prefs for ibus-mozc Japanese input method.
303// ibus-mozc converts the string values to protobuf enum values defined in
304// third_party/ibus-mozc/files/src/session/config.proto.
305const char kLanguageMozcPreeditMethod[] =
306    "settings.language.mozc_preedit_method";
307const char kLanguageMozcSessionKeymap[] =
308    "settings.language.mozc_session_keymap";
309const char kLanguageMozcPunctuationMethod[] =
310    "settings.language.mozc_punctuation_method";
311const char kLanguageMozcSymbolMethod[] =
312    "settings.language.mozc_symbol_method";
313const char kLanguageMozcSpaceCharacterForm[] =
314    "settings.language.mozc_space_character_form";
315const char kLanguageMozcHistoryLearningLevel[] =
316    "settings.language.mozc_history_learning_level";
317const char kLanguageMozcSelectionShortcut[] =
318    "settings.language.mozc_selection_shortcut";
319const char kLanguageMozcShiftKeyModeSwitch[] =
320    "settings.language.mozc_shift_key_mode_switch";
321const char kLanguageMozcNumpadCharacterForm[] =
322    "settings.language.mozc_numpad_character_form";
323const char kLanguageMozcIncognitoMode[] =
324    "settings.language.mozc_incognito_mode";
325const char kLanguageMozcUseAutoImeTurnOff[] =
326    "settings.language.mozc_use_auto_ime_turn_off";
327const char kLanguageMozcUseDateConversion[] =
328    "settings.language.mozc_use_date_conversion";
329const char kLanguageMozcUseSingleKanjiConversion[] =
330    "settings.language.mozc_use_single_kanji_conversion";
331const char kLanguageMozcUseSymbolConversion[] =
332    "settings.language.mozc_use_symbol_conversion";
333const char kLanguageMozcUseNumberConversion[] =
334    "settings.language.mozc_use_number_conversion";
335const char kLanguageMozcUseHistorySuggest[] =
336    "settings.language.mozc_use_history_suggest";
337const char kLanguageMozcUseDictionarySuggest[] =
338    "settings.language.mozc_use_dictionary_suggest";
339const char kLanguageMozcSuggestionsSize[] =
340    "settings.language.mozc_suggestions_size";
341
342// A integer prefs which determine how we remap modifier keys (e.g. swap Alt-L
343// and Control-L.) Possible values for these prefs are 0-4. See ModifierKey enum
344// in src/third_party/cros/chrome_keyboard.h for details.
345const char kLanguageXkbRemapSearchKeyTo[] =
346    "settings.language.xkb_remap_search_key_to";
347const char kLanguageXkbRemapControlKeyTo[] =
348    "settings.language.xkb_remap_control_key_to";
349const char kLanguageXkbRemapAltKeyTo[] =
350    "settings.language.xkb_remap_alt_key_to";
351
352// A boolean pref which determines whether key repeat is enabled.
353const char kLanguageXkbAutoRepeatEnabled[] =
354    "settings.language.xkb_auto_repeat_enabled_r2";
355// A integer pref which determines key repeat delay (in ms).
356const char kLanguageXkbAutoRepeatDelay[] =
357    "settings.language.xkb_auto_repeat_delay_r2";
358// A integer pref which determines key repeat interval (in ms).
359const char kLanguageXkbAutoRepeatInterval[] =
360    "settings.language.xkb_auto_repeat_interval_r2";
361// "_r2" suffixes are added to the three prefs above when we change the
362// preferences not user-configurable, not to sync them with cloud.
363
364// A boolean pref which determines whether accessibility is enabled.
365const char kAccessibilityEnabled[] = "settings.accessibility";
366
367// A boolean pref which turns on Advanced Filesystem
368// (USB support, SD card, etc).
369const char kLabsAdvancedFilesystemEnabled[] =
370    "settings.labs.advanced_filesystem";
371
372// A boolean pref which turns on the mediaplayer.
373const char kLabsMediaplayerEnabled[] = "settings.labs.mediaplayer";
374
375// An integer pref which maps to the extension state for Talk.
376const char kLabsTalkEnabled[] =
377    "extensions.settings.ggnioahjipcehijkhpdjekioddnjoben.state";
378
379#endif  // defined(OS_CHROMEOS)
380
381// The disabled messages in IPC logging.
382const char kIpcDisabledMessages[] = "ipc_log_disabled_messages";
383
384// A boolean pref set to true if a Home button to open the Home pages should be
385// visible on the toolbar.
386const char kShowHomeButton[] = "browser.show_home_button";
387
388// A boolean pref set to true if the Page and Options menu buttons should be
389// visible on the toolbar. This is only used for Mac where the default is to
390// have these menu in the main menubar, not as buttons on the toolbar.
391const char kShowPageOptionsButtons[] = "browser.show_page_options_buttons";
392
393// A string value which saves short list of recently user selected encodings
394// separated with comma punctuation mark.
395const char kRecentlySelectedEncoding[] = "profile.recently_selected_encodings";
396
397// Clear Browsing Data dialog preferences.
398const char kDeleteBrowsingHistory[] = "browser.clear_data.browsing_history";
399const char kDeleteDownloadHistory[] = "browser.clear_data.download_history";
400const char kDeleteCache[] = "browser.clear_data.cache";
401const char kDeleteCookies[] = "browser.clear_data.cookies";
402const char kDeletePasswords[] = "browser.clear_data.passwords";
403const char kDeleteFormData[] = "browser.clear_data.form_data";
404const char kDeleteTimePeriod[] = "browser.clear_data.time_period";
405
406// Boolean pref to define the default values for using spellchecker.
407const char kEnableSpellCheck[] = "browser.enable_spellchecking";
408
409// List of names of the enabled labs experiments (see chrome/browser/labs.cc).
410const char kEnabledLabsExperiments[] = "browser.enabled_labs_experiments";
411
412// Boolean pref to define the default values for using auto spell correct.
413const char kEnableAutoSpellCorrect[] = "browser.enable_autospellcorrect";
414
415// Boolean controlling whether printing is enabled.
416const char kPrintingEnabled[] = "printing.enabled";
417
418// String pref to define the default values for print overlays.
419const char kPrintingPageHeaderLeft[] = "printing.page.header.left";
420const char kPrintingPageHeaderCenter[] = "printing.page.header.center";
421const char kPrintingPageHeaderRight[] = "printing.page.header.right";
422const char kPrintingPageFooterLeft[] = "printing.page.footer.left";
423const char kPrintingPageFooterCenter[] = "printing.page.footer.center";
424const char kPrintingPageFooterRight[] = "printing.page.footer.right";
425#if defined(TOOLKIT_USES_GTK)
426// GTK specific preference on whether we should match the system GTK theme.
427const char kUsesSystemTheme[] = "extensions.theme.use_system";
428#endif
429const char kCurrentThemePackFilename[] = "extensions.theme.pack";
430const char kCurrentThemeID[] = "extensions.theme.id";
431const char kCurrentThemeImages[] = "extensions.theme.images";
432const char kCurrentThemeColors[] = "extensions.theme.colors";
433const char kCurrentThemeTints[] = "extensions.theme.tints";
434const char kCurrentThemeDisplayProperties[] = "extensions.theme.properties";
435
436// Boolean pref which persists whether the extensions_ui is in developer mode
437// (showing developer packing tools and extensions details)
438const char kExtensionsUIDeveloperMode[] = "extensions.ui.developer_mode";
439
440// Integer pref that tracks the number of browser actions visible in the browser
441// actions toolbar.
442const char kExtensionToolbarSize[] = "extensions.toolbarsize";
443
444// Pref containing the directory for internal plugins as written to the plugins
445// list (below).
446const char kPluginsLastInternalDirectory[] = "plugins.last_internal_directory";
447
448// List pref containing information (dictionaries) on plugins.
449const char kPluginsPluginsList[] = "plugins.plugins_list";
450
451// List pref containing names of plugins that are disabled by policy.
452const char kPluginsPluginsBlacklist[] = "plugins.plugins_blacklist";
453
454// When first shipped, the pdf plugin will be disabled by default.  When we
455// enable it by default, we'll want to do so only once.
456const char kPluginsEnabledInternalPDF[] = "plugins.enabled_internal_pdf2";
457
458// Boolean that indicates whether we should check if we are the default browser
459// on start-up.
460const char kCheckDefaultBrowser[] = "browser.check_default_browser";
461
462#if defined(OS_MACOSX)
463// Boolean that indicates whether the application should show the info bar
464// asking the user to set up automatic updates when Keystone promotion is
465// required.
466const char kShowUpdatePromotionInfoBar[] =
467    "browser.show_update_promotion_info_bar";
468#endif
469
470// Boolean that is false if we should show window manager decorations.  If
471// true, we draw a custom chrome frame (thicker title bar and blue border).
472const char kUseCustomChromeFrame[] = "browser.custom_chrome_frame";
473
474// Boolean that indicates whether the infobar explaining that search can be
475// done directly from the omnibox should be shown.
476const char kShowOmniboxSearchHint[] = "browser.show_omnibox_search_hint";
477
478// The list of origins which are allowed|denied to show desktop notifications.
479const char kDesktopNotificationDefaultContentSetting[] =
480    "profile.notifications_default_content_setting";
481const char kDesktopNotificationAllowedOrigins[] =
482    "profile.notification_allowed_sites";
483const char kDesktopNotificationDeniedOrigins[] =
484    "profile.notification_denied_sites";
485
486// Dictionary of content settings applied to all hosts by default.
487const char kDefaultContentSettings[] = "profile.default_content_settings";
488
489// OBSOLETE. Dictionary that maps hostnames to content related settings.
490// Default settings will be applied to hosts not in this pref.
491const char kPerHostContentSettings[] = "profile.per_host_content_settings";
492
493// Version of the pattern format used to define content settings.
494const char kContentSettingsVersion[] = "profile.content_settings.pref_version";
495
496// Patterns for mapping hostnames to content related settings. Default settings
497// will be applied to hosts that don't match any of the patterns. Replaces
498// kPerHostContentSettings. The pattern format used is defined by
499// kContentSettingsVersion.
500const char kContentSettingsPatterns[] = "profile.content_settings.patterns";
501
502// Boolean that is true if we should unconditionally block third-party cookies,
503// regardless of other content settings.
504const char kBlockThirdPartyCookies[] = "profile.block_third_party_cookies";
505
506// Boolean that is true if non-sandboxed plug-ins should be blocked.
507const char kBlockNonsandboxedPlugins[] = "profile.block_nonsandboxed_plugins";
508
509// Boolean that is true when all locally stored site data (e.g. cookies, local
510// storage, etc..) should be deleted on exit.
511const char kClearSiteDataOnExit[] = "profile.clear_site_data_on_exit";
512
513// Dictionary that maps hostnames to zoom levels.  Hosts not in this pref will
514// be displayed at the default zoom level.
515const char kPerHostZoomLevels[] = "profile.per_host_zoom_levels";
516
517// Boolean that is true if AutoFill is enabled and allowed to save profile data.
518const char kAutoFillEnabled[] = "autofill.enabled";
519
520// Boolean that is true when auxiliary AutoFill profiles are enabled.
521// Currently applies to Address Book "me" card on Mac.  False on Win and Linux.
522const char kAutoFillAuxiliaryProfilesEnabled[] =
523    "autofill.auxiliary_profiles_enabled";
524
525// Position and size of the AutoFill dialog.
526const char kAutoFillDialogPlacement[] = "autofill.dialog_placement";
527
528// Double that indicates positive (for matched forms) upload rate.
529const char kAutoFillPositiveUploadRate[] = "autofill.positive_upload_rate";
530
531// Double that indicates negative (for not matched forms) upload rate.
532const char kAutoFillNegativeUploadRate[] = "autofill.negative_upload_rate";
533
534// Boolean that is true when the tabstrip is to be laid out vertically down the
535// side of the browser window.
536const char kUseVerticalTabs[] = "tabs.use_vertical_tabs";
537
538// Boolean that is true when the translate feature is enabled.
539const char kEnableTranslate[] = "translate.enabled";
540
541const char kPinnedTabs[] = "pinned_tabs";
542
543// Integer containing the default Geolocation content setting.
544const char kGeolocationDefaultContentSetting[] =
545    "geolocation.default_content_setting";
546
547// Dictionary that maps [frame, toplevel] to their Geolocation content setting.
548const char kGeolocationContentSettings[] = "geolocation.content_settings";
549
550// *************** LOCAL STATE ***************
551// These are attached to the machine/installation
552
553// The metrics client GUID and session ID.
554const char kMetricsClientID[] = "user_experience_metrics.client_id";
555const char kMetricsSessionID[] = "user_experience_metrics.session_id";
556
557// Date/time when the current metrics profile ID was created
558// (which hopefully corresponds to first run).
559const char kMetricsClientIDTimestamp[] =
560    "user_experience_metrics.client_id_timestamp";
561
562// Boolean that specifies whether or not crash reporting and metrics reporting
563// are sent over the network for analysis.
564const char kMetricsReportingEnabled[] =
565    "user_experience_metrics.reporting_enabled";
566
567// Array of strings that are each UMA logs that were supposed to be sent in the
568// first minute of a browser session. These logs include things like crash count
569// info, etc.
570const char kMetricsInitialLogs[] =
571    "user_experience_metrics.initial_logs";
572
573// Array of strings that are each UMA logs that were not sent because the
574// browser terminated before these accumulated metrics could be sent.  These
575// logs typically include histograms and memory reports, as well as ongoing
576// user activities.
577const char kMetricsOngoingLogs[] =
578    "user_experience_metrics.ongoing_logs";
579
580// Where profile specific metrics are placed.
581const char kProfileMetrics[] = "user_experience_metrics.profiles";
582
583// The metrics for a profile are stored as dictionary values under the
584// path kProfileMetrics. The individual metrics are placed under the path
585// kProfileMetrics.kProfilePrefix<hashed-profile-id>.
586const char kProfilePrefix[] = "profile-";
587
588// True if the previous run of the program exited cleanly.
589const char kStabilityExitedCleanly[] =
590    "user_experience_metrics.stability.exited_cleanly";
591
592// Version string of previous run, which is used to assure that stability
593// metrics reported under current version reflect stability of the same version.
594const char kStabilityStatsVersion[] =
595    "user_experience_metrics.stability.stats_version";
596
597// Build time, in seconds since an epoch, which is used to assure that stability
598// metrics reported reflect stability of the same build.
599const char kStabilityStatsBuildTime[] =
600    "user_experience_metrics.stability.stats_buildtime";
601
602// False if we received a session end and either we crashed during processing
603// the session end or ran out of time and windows terminated us.
604const char kStabilitySessionEndCompleted[] =
605    "user_experience_metrics.stability.session_end_completed";
606
607// Number of times the application was launched since last report.
608const char kStabilityLaunchCount[] =
609    "user_experience_metrics.stability.launch_count";
610
611// Number of times the application exited uncleanly since the last report.
612const char kStabilityCrashCount[] =
613    "user_experience_metrics.stability.crash_count";
614
615// Number of times the session end did not complete.
616const char kStabilityIncompleteSessionEndCount[] =
617    "user_experience_metrics.stability.incomplete_session_end_count";
618
619// Number of times a page load event occurred since the last report.
620const char kStabilityPageLoadCount[] =
621    "user_experience_metrics.stability.page_load_count";
622
623// Number of times a renderer process crashed since the last report.
624const char kStabilityRendererCrashCount[] =
625    "user_experience_metrics.stability.renderer_crash_count";
626
627// Number of times an extension renderer process crashed since the last report.
628const char kStabilityExtensionRendererCrashCount[] =
629    "user_experience_metrics.stability.extension_renderer_crash_count";
630
631// Time when the app was last launched, in seconds since the epoch.
632const char kStabilityLaunchTimeSec[] =
633    "user_experience_metrics.stability.launch_time_sec";
634
635// Time when the app was last known to be running, in seconds since
636// the epoch.
637const char kStabilityLastTimestampSec[] =
638    "user_experience_metrics.stability.last_timestamp_sec";
639
640// This is the location of a list of dictionaries of plugin stability stats.
641const char kStabilityPluginStats[] =
642    "user_experience_metrics.stability.plugin_stats2";
643
644// Number of times the renderer has become non-responsive since the last
645// report.
646const char kStabilityRendererHangCount[] =
647    "user_experience_metrics.stability.renderer_hang_count";
648
649// Total number of child process crashes (other than renderer / extension
650// renderer ones, and plugin children, which are counted separately) since the
651// last report.
652const char kStabilityChildProcessCrashCount[] =
653    "user_experience_metrics.stability.child_process_crash_count";
654
655// Number of times the browser has been able to register crash reporting.
656const char kStabilityBreakpadRegistrationSuccess[] =
657    "user_experience_metrics.stability.breakpad_registration_ok";
658
659// Number of times the browser has failed to register crash reporting.
660const char kStabilityBreakpadRegistrationFail[] =
661    "user_experience_metrics.stability.breakpad_registration_fail";
662
663// Number of times the browser has been run under a debugger.
664const char kStabilityDebuggerPresent[] =
665    "user_experience_metrics.stability.debugger_present";
666
667// Number of times the browser has not been run under a debugger.
668const char kStabilityDebuggerNotPresent[] =
669    "user_experience_metrics.stability.debugger_not_present";
670
671// The keys below are used for the dictionaries in the
672// kStabilityPluginStats list.
673const char kStabilityPluginName[] = "name";
674const char kStabilityPluginLaunches[] = "launches";
675const char kStabilityPluginInstances[] = "instances";
676const char kStabilityPluginCrashes[] = "crashes";
677
678// The keys below are strictly increasing counters over the lifetime of
679// a chrome installation. They are (optionally) sent up to the uninstall
680// survey in the event of uninstallation.
681const char kUninstallMetricsPageLoadCount[] =
682    "uninstall_metrics.page_load_count";
683const char kUninstallLaunchCount[] = "uninstall_metrics.launch_count";
684const char kUninstallMetricsInstallDate[] =
685    "uninstall_metrics.installation_date2";
686const char kUninstallMetricsUptimeSec[] = "uninstall_metrics.uptime_sec";
687const char kUninstallLastLaunchTimeSec[] =
688    "uninstall_metrics.last_launch_time_sec";
689const char kUninstallLastObservedRunTimeSec[] =
690    "uninstall_metrics.last_observed_running_time_sec";
691
692// A collection of position, size, and other data relating to the browser
693// window to restore on startup.
694const char kBrowserWindowPlacement[] = "browser.window_placement";
695
696// A collection of position, size, and other data relating to the task
697// manager window to restore on startup.
698const char kTaskManagerWindowPlacement[] = "task_manager.window_placement";
699
700// A collection of position, size, and other data relating to the page info
701// window to restore on startup.
702const char kPageInfoWindowPlacement[] = "page_info.window_placement";
703
704// A collection of position, size, and other data relating to the keyword
705// editor window to restore on startup.
706const char kKeywordEditorWindowPlacement[] = "keyword_editor.window_placement";
707
708// A collection of position, size, and other data relating to the preferences
709// window to restore on startup.
710const char kPreferencesWindowPlacement[] = "preferences.window_placement";
711
712// An integer specifying the total number of bytes to be used by the
713// renderer's in-memory cache of objects.
714const char kMemoryCacheSize[] = "renderer.memory_cache.size";
715
716// Boolean that records if chrome should run in background mode when background
717// apps are installed.
718const char kBackgroundModeEnabled[] = "background_mode.enabled";
719
720// Boolean that records if chrome has set "launch on startup" property for
721// itself earlier and is allowed to reset it later, reducing likelihood of
722// overriding user choices.
723const char kLaunchOnStartupResetAllowed[] = "launch_on_startup_reset_allowed";
724
725// String which specifies where to download files to by default.
726const char kDownloadDefaultDirectory[] = "download.default_directory";
727
728// Boolean that records if the download directory was changed by an
729// upgrade a unsafe location to a safe location.
730const char kDownloadDirUpgraded[] = "download.directory_upgrade";
731
732// String which specifies where to save html files to by default.
733const char kSaveFileDefaultDirectory[] = "savefile.default_directory";
734
735// String which specifies the last directory that was chosen for uploading
736// or opening a file.
737extern const char kSelectFileLastDirectory[] = "selectfile.last_directory";
738
739// Extensions which should be opened upon completion.
740const char kDownloadExtensionsToOpen[] = "download.extensions_to_open";
741
742// Integer which specifies the frequency in milliseconds for detecting whether
743// plugin windows are hung.
744const char kHungPluginDetectFrequency[] = "browser.hung_plugin_detect_freq";
745
746// Integer which specifies the timeout value to be used for SendMessageTimeout
747// to detect a hung plugin window.
748const char kPluginMessageResponseTimeout[] =
749    "browser.plugin_message_response_timeout";
750
751// String which represents the dictionary name for our spell-checker.
752const char kSpellCheckDictionary[] = "spellcheck.dictionary";
753
754// Dictionary of schemes used by the external protocol handler.
755// The value is true if the scheme must be ignored.
756const char kExcludedSchemes[] = "protocol_handler.excluded_schemes";
757
758// Keys used for MAC handling of SafeBrowsing requests.
759const char kSafeBrowsingClientKey[] = "safe_browsing.client_key";
760const char kSafeBrowsingWrappedKey[] = "safe_browsing.wrapped_key";
761
762// Integer that specifies the index of the tab the user was on when they
763// last visited the options window.
764const char kOptionsWindowLastTabIndex[] = "options_window.last_tab_index";
765
766// Integer that specifies the index of the tab the user was on when they
767// last visited the content settings window.
768const char kContentSettingsWindowLastTabIndex[] =
769    "content_settings_window.last_tab_index";
770
771// Integer that specifies the index of the tab the user was on when they
772// last visited the Certificate Manager window.
773const char kCertificateManagerWindowLastTabIndex[] =
774    "certificate_manager_window.last_tab_index";
775
776// The mere fact that this pref is registered signals that we should show the
777// First Run Search Information bubble when the first browser window appears.
778// This preference is only registered by the first-run procedure.
779const char kShouldShowFirstRunBubble[] = "show-first-run-bubble";
780
781// The mere fact that this pref is registered signals that we should show the
782// smaller OEM First Run Search Information bubble when the first
783// browser window appears.
784// This preference is only registered by the first-run procedure.
785const char kShouldUseOEMFirstRunBubble[] = "show-OEM-first-run-bubble";
786
787// The mere fact that this pref is registered signals that we should show the
788// minimal First Run omnibox information bubble when the first
789// browser window appears.
790// This preference is only registered by the first-run procedure.
791const char kShouldUseMinimalFirstRunBubble[] = "show-minimal-first-run-bubble";
792
793// Signal that we should show the welcome page when we launch Chrome.
794const char kShouldShowWelcomePage[] = "show-welcome-page";
795
796// String containing the last known Google URL.  We re-detect this on startup in
797// most cases, and use it to send traffic to the correct Google host or with the
798// correct Google domain/country code for whatever location the user is in.
799const char kLastKnownGoogleURL[] = "browser.last_known_google_url";
800
801// String containing the last prompted Google URL to the user.
802// If the user is using .x TLD for Google URL and gets prompted about .y TLD
803// for Google URL, and says "no", we should leave the search engine set to .x
804// but not prompt again until the domain changes away from .y.
805const char kLastPromptedGoogleURL[] = "browser.last_prompted_google_url";
806
807// String containing the last known intranet redirect URL, if any.  See
808// intranet_redirect_detector.h for more information.
809const char kLastKnownIntranetRedirectOrigin[] = "";
810
811// Integer containing the system Country ID the first time we checked the
812// template URL prepopulate data.  This is used to avoid adding a whole bunch of
813// new search engine choices if prepopulation runs when the user's Country ID
814// differs from their previous Country ID.  This pref does not exist until
815// prepopulation has been run at least once.
816const char kCountryIDAtInstall[] = "countryid_at_install";
817// OBSOLETE. Same as above, but uses the Windows-specific GeoID value instead.
818// Updated if found to the above key.
819const char kGeoIDAtInstall[] = "geoid_at_install";
820
821// An enum value of how the browser was shut down (see browser_shutdown.h).
822const char kShutdownType[] = "shutdown.type";
823// Number of processes that were open when the user shut down.
824const char kShutdownNumProcesses[] = "shutdown.num_processes";
825// Number of processes that were shut down using the slow path.
826const char kShutdownNumProcessesSlow[] = "shutdown.num_processes_slow";
827
828// Whether to restart the current Chrome session automatically as the last thing
829// before shutting everything down.
830const char kRestartLastSessionOnShutdown[] = "restart.last.session.on.shutdown";
831
832// Number of bookmarks/folders on the bookmark bar/other bookmark folder.
833const char kNumBookmarksOnBookmarkBar[] =
834    "user_experience_metrics.num_bookmarks_on_bookmark_bar";
835const char kNumFoldersOnBookmarkBar[] =
836    "user_experience_metrics.num_folders_on_bookmark_bar";
837const char kNumBookmarksInOtherBookmarkFolder[] =
838    "user_experience_metrics.num_bookmarks_in_other_bookmark_folder";
839const char kNumFoldersInOtherBookmarkFolder[] =
840    "user_experience_metrics.num_folders_in_other_bookmark_folder";
841
842// Number of keywords.
843const char kNumKeywords[] = "user_experience_metrics.num_keywords";
844
845// Placeholder preference for disabling voice / video chat if it is ever added.
846// Currently, this does not change any behavior.
847const char kDisableVideoAndChat[] = "disable_video_chat";
848
849// Whether Extensions are enabled.
850const char kDisableExtensions[] = "extensions.disabled";
851
852// Integer boolean representing the width (in pixels) of the container for
853// browser actions.
854const char kBrowserActionContainerWidth[] =
855    "extensions.browseractions.container.width";
856
857// A whitelist of extension the user can install. This is controlled by the
858// administrator.
859const char kExtensionInstallAllowList[] = "extensions.install.allowlist";
860// A blacklist, containing extensions the user cannot install.  This is
861// controlled by the administrator. This list should not be confused with
862// the extension blacklist, which is Google controlled.
863const char kExtensionInstallDenyList[] = "extensions.install.denylist";
864
865// Time of the last, and next scheduled, extensions auto-update checks.
866const char kLastExtensionsUpdateCheck[] = "extensions.autoupdate.last_check";
867const char kNextExtensionsUpdateCheck[] = "extensions.autoupdate.next_check";
868// Version number of last blacklist check
869const char kExtensionBlacklistUpdateVersion[] =
870    "extensions.blacklistupdate.version";
871
872const char kExtensionSidebarWidth[] = "extensions.sidebar.width";
873
874// New Tab Page URLs that should not be shown as most visited thumbnails.
875const char kNTPMostVisitedURLsBlacklist[] = "ntp.most_visited_blacklist";
876
877// The URLs that have been pinned to the Most Visited section of the New Tab
878// Page.
879const char kNTPMostVisitedPinnedURLs[] = "ntp.pinned_urls";
880
881// Data downloaded from resource pages (JSON, RSS) to be used to dynamically
882// deliver data for the new tab page.
883const char kNTPWebResourceCache[] = "ntp.web_resource_cache";
884
885// Last time of update of web_resource_cache.
886const char kNTPWebResourceCacheUpdate[] = "ntp.web_resource_cache_update";
887
888// Last server used to fill tips.
889const char kNTPTipsResourceServer[] = "ntp.tips_resource_server";
890
891// Last server used to fill logo_resource_cache.
892const char kNTPLogoResourceServer[] = "ntp.logo_resource_server";
893
894// Which sections should be visible on the new tab page
895// 1 - Show the most visited sites in a grid
896// 2 - Show the most visited sites as a list
897// 4 - Show the recent section
898// 8 - (Show tips -- DEPRECATED)
899// 16 - Show sync status
900const char kNTPShownSections[] = "ntp.shown_sections";
901
902// This pref is used for migrating the prefs for the NTP
903const char kNTPPrefVersion[] = "ntp.pref_version";
904
905// Dates between which the NTP should show a custom logo rather than the
906// standard one.
907const char kNTPCustomLogoStart[] = "ntp.custom_logo_start";
908const char kNTPCustomLogoEnd[] = "ntp.custom_logo_end";
909
910// A boolean specifying whether dev tools window should be opened docked.
911const char kDevToolsOpenDocked[] = "devtools.open_docked";
912
913// Integer location of the split bar in the browser view.
914const char kDevToolsSplitLocation[] = "devtools.split_location";
915
916// 64-bit integer serialization of the base::Time when the last sync occurred.
917const char kSyncLastSyncedTime[] = "sync.last_synced_time";
918
919// Boolean specifying whether the user finished setting up sync.
920const char kSyncHasSetupCompleted[] = "sync.has_setup_completed";
921
922// Boolean specifying whether to automatically sync all data types (including
923// future ones, as they're added).  If this is true, the following preferences
924// (kSyncBookmarks, kSyncPasswords, etc.) can all be ignored.
925const char kKeepEverythingSynced[] = "sync.keep_everything_synced";
926
927// Booleans specifying whether the user has selected to sync the following
928// datatypes.
929const char kSyncBookmarks[] = "sync.bookmarks";
930const char kSyncPasswords[] = "sync.passwords";
931const char kSyncPreferences[] = "sync.preferences";
932const char kSyncApps[] = "sync.apps";
933const char kSyncAutofill[] = "sync.autofill";
934const char kSyncThemes[] = "sync.themes";
935const char kSyncTypedUrls[] = "sync.typed_urls";
936const char kSyncExtensions[] = "sync.extensions";
937const char kSyncSessions[] = "sync.sessions";
938
939// Boolean used by enterprise configuration management in order to lock down
940// sync.
941const char kSyncManaged[] = "sync.managed";
942
943// Boolean to prevent sync from automatically starting up.  This is
944// used when sync is disabled by the user via the privacy dashboard.
945const char kSyncSuppressStart[] = "sync.suppress_start";
946
947// Boolean to reperesent if sync credentials have been migrated from the
948// user settings DB to the token service.
949const char kSyncCredentialsMigrated[] = "sync.credentials_migrated";
950
951// A string that can be used to restore sync encryption infrastructure on
952// startup so that the user doesn't need to provide credentials on each start.
953const char kEncryptionBootstrapToken[] = "sync.encryption_bootstrap_token";
954
955// Boolean tracking whether the user chose to specify a secondary encryption
956// passphrase.
957const char kSyncUsingSecondaryPassphrase[] = "sync.using_secondary_passphrase";
958
959// String that identifies the user logged into sync and other google services.
960const char kGoogleServicesUsername[] = "google.services.username";
961
962// Create web application shortcut dialog preferences.
963const char kWebAppCreateOnDesktop[] = "browser.web_app.create_on_desktop";
964const char kWebAppCreateInAppsMenu[] = "browser.web_app.create_in_apps_menu";
965const char kWebAppCreateInQuickLaunchBar[] =
966    "browser.web_app.create_in_quick_launch_bar";
967
968// Dictionary that maps Geolocation network provider server URLs to
969// corresponding access token.
970const char kGeolocationAccessToken[] = "geolocation.access_token";
971
972// Whether PasswordForms have been migrated from the WedDataService to the
973// LoginDatabase.
974const char kLoginDatabaseMigrated[] = "login_database.migrated";
975
976// The root URL of the cloud print service.
977const char kCloudPrintServiceURL[] = "cloud_print.service_url";
978
979const char kRemotingHasSetupCompleted[] = "remoting.has_setup_completed";
980
981// The list of BackgroundContents that should be loaded when the browser
982// launches.
983const char kRegisteredBackgroundContents[] = "background_contents.registered";
984
985// *************** SERVICE PREFS ***************
986// These are attached to the service process.
987
988const char kCloudPrintProxyEnabled[] = "cloud_print.enabled";
989// The unique id for this instance of the cloud print proxy.
990const char kCloudPrintProxyId[] = "cloud_print.proxy_id";
991// The GAIA auth token for Cloud Print
992const char kCloudPrintAuthToken[] = "cloud_print.auth_token";
993// The GAIA auth token used by Cloud Print to authenticate with the XMPP server
994// This should eventually go away because the above token should work for both.
995const char kCloudPrintXMPPAuthToken[] = "cloud_print.xmpp_auth_token";
996// The email address of the account used to authenticate with the Cloud Print
997// server.
998extern const char kCloudPrintEmail[] = "cloud_print.email";
999// Settings specific to underlying print system.
1000extern const char kCloudPrintPrintSystemSettings[] =
1001    "cloud_print.print_system_settings";
1002
1003// Used by the service process to determine if the remoting host is enabled.
1004const char kRemotingHostEnabled[] = "remoting.host_enabled";
1005
1006// Boolean to disable proxy altogether. If true, other proxy
1007// preferences are ignored.
1008const char kNoProxyServer[] = "proxy.disabled";
1009// Boolean specifying if proxy should be auto-detected.
1010const char kProxyAutoDetect[] = "proxy.auto_detect";
1011// String specifying the proxy server. For a specification of the expected
1012// syntax see net::ProxyConfig::ProxyRules::ParseFromString().
1013const char kProxyServer[] = "proxy.server";
1014// URL to the proxy .pac file.
1015const char kProxyPacUrl[] = "proxy.pac_url";
1016// String containing proxy bypass rules. For a specification of the
1017// expected syntax see net::ProxyBypassRules::ParseFromString().
1018const char kProxyBypassList[] = "proxy.bypass_list";
1019
1020}  // namespace prefs
1021