1 // Copyright 2017 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 "ash/public/cpp/ash_pref_names.h"
6 
7 namespace ash {
8 
9 namespace prefs {
10 
11 // A boolean pref which determines whether the large cursor feature is enabled.
12 const char kAccessibilityLargeCursorEnabled[] =
13     "settings.a11y.large_cursor_enabled";
14 // An integer pref that specifies the size of large cursor for accessibility.
15 const char kAccessibilityLargeCursorDipSize[] =
16     "settings.a11y.large_cursor_dip_size";
17 // A boolean pref which determines whether the sticky keys feature is enabled.
18 const char kAccessibilityStickyKeysEnabled[] =
19     "settings.a11y.sticky_keys_enabled";
20 // A boolean pref which determines whether spoken feedback is enabled.
21 const char kAccessibilitySpokenFeedbackEnabled[] = "settings.accessibility";
22 // A boolean pref which determines whether high contrast is enabled.
23 const char kAccessibilityHighContrastEnabled[] =
24     "settings.a11y.high_contrast_enabled";
25 // A boolean pref which determines whether screen magnifier is enabled.
26 // NOTE: We previously had prefs named settings.a11y.screen_magnifier_type and
27 // settings.a11y.screen_magnifier_type2, but we only shipped one type (full).
28 // See http://crbug.com/170850 for history.
29 const char kAccessibilityScreenMagnifierEnabled[] =
30     "settings.a11y.screen_magnifier";
31 // A boolean pref which determines whether focus following for screen magnifier
32 // is enabled.
33 const char kAccessibilityScreenMagnifierFocusFollowingEnabled[] =
34     "settings.a11y.screen_magnifier_focus_following";
35 // A boolean pref which determines whether screen magnifier should center
36 // the text input focus.
37 const char kAccessibilityScreenMagnifierCenterFocus[] =
38     "settings.a11y.screen_magnifier_center_focus";
39 // A double pref which determines a zooming scale of the screen magnifier.
40 const char kAccessibilityScreenMagnifierScale[] =
41     "settings.a11y.screen_magnifier_scale";
42 // A boolean pref which determines whether the virtual keyboard is enabled for
43 // accessibility.  This feature is separate from displaying an onscreen keyboard
44 // due to lack of a physical keyboard.
45 const char kAccessibilityVirtualKeyboardEnabled[] =
46     "settings.a11y.virtual_keyboard";
47 // A pref that identifies which kind of features are enabled for the Web Kiosk
48 // session.
49 const char kAccessibilityVirtualKeyboardFeatures[] =
50     "settings.a11y.virtual_keyboard_features";
51 // A boolean pref which determines whether the mono audio output is enabled for
52 // accessibility.
53 const char kAccessibilityMonoAudioEnabled[] = "settings.a11y.mono_audio";
54 // A boolean pref which determines whether autoclick is enabled.
55 const char kAccessibilityAutoclickEnabled[] = "settings.a11y.autoclick";
56 // A boolean pref which determines whether the accessibility shortcuts are
57 // enabled or not.
58 const char kAccessibilityShortcutsEnabled[] = "settings.a11y.shortcuts_enabled";
59 // An integer pref which determines time in ms between when the mouse cursor
60 // stops and when an autoclick event is triggered.
61 const char kAccessibilityAutoclickDelayMs[] =
62     "settings.a11y.autoclick_delay_ms";
63 // An integer pref which determines the event type for an autoclick event. This
64 // maps to mojom::AccessibilityController::AutoclickEventType.
65 const char kAccessibilityAutoclickEventType[] =
66     "settings.a11y.autoclick_event_type";
67 // Whether Autoclick should immediately return to left click after performing
68 // another event type action, or whether it should stay as the other event type.
69 const char kAccessibilityAutoclickRevertToLeftClick[] =
70     "settings.a11y.autoclick_revert_to_left_click";
71 // Whether Autoclick should stabilize the cursor movement before a click occurs
72 // or not.
73 const char kAccessibilityAutoclickStabilizePosition[] =
74     "settings.a11y.autoclick_stabilize_position";
75 // The default threshold of mouse movement, measured in DIP, that will initiate
76 // a new autoclick.
77 const char kAccessibilityAutoclickMovementThreshold[] =
78     "settings.a11y.autoclick_movement_threshold";
79 // The Autoclick menu position on the screen, an AutoclickMenuPosition.
80 const char kAccessibilityAutoclickMenuPosition[] =
81     "settings.a11y.autoclick_menu_position";
82 // A boolean pref which determines whether caret highlighting is enabled.
83 const char kAccessibilityCaretHighlightEnabled[] =
84     "settings.a11y.caret_highlight";
85 // A boolean pref which determines whether cursor highlighting is enabled.
86 const char kAccessibilityCursorHighlightEnabled[] =
87     "settings.a11y.cursor_highlight";
88 // A boolean pref which determines whether custom cursor color is enabled.
89 const char kAccessibilityCursorColorEnabled[] =
90     "settings.a11y.cursor_color_enabled";
91 // An integer pref which determines the custom cursor color.
92 const char kAccessibilityCursorColor[] = "settings.a11y.cursor_color";
93 // A boolean pref which determines whether floating accessibility menu is
94 // enabled.
95 const char kAccessibilityFloatingMenuEnabled[] = "settings.a11y.floating_menu";
96 // Floating a11y menu position, a FloatingMenuPosition;
97 const char kAccessibilityFloatingMenuPosition[] =
98     "settings.a11y.floating_menu_position";
99 // A boolean pref which determines whether focus highlighting is enabled.
100 const char kAccessibilityFocusHighlightEnabled[] =
101     "settings.a11y.focus_highlight";
102 // A boolean pref which determines whether select-to-speak is enabled.
103 const char kAccessibilitySelectToSpeakEnabled[] =
104     "settings.a11y.select_to_speak";
105 // A boolean pref which determines whether Switch Access is enabled.
106 const char kAccessibilitySwitchAccessEnabled[] =
107     "settings.a11y.switch_access.enabled";
108 // A pref that stores the key code for the "select" action.
109 const char kAccessibilitySwitchAccessSelectKeyCodes[] =
110     "settings.a11y.switch_access.select.key_codes";
111 // A pref that stores the setting value for the "select" action.
112 const char kAccessibilitySwitchAccessSelectSetting[] =
113     "settings.a11y.switch_access.select.setting";
114 // A pref that stores the key code for the "next" action.
115 const char kAccessibilitySwitchAccessNextKeyCodes[] =
116     "settings.a11y.switch_access.next.key_codes";
117 // A pref that stores the setting value for the "next" action.
118 const char kAccessibilitySwitchAccessNextSetting[] =
119     "settings.a11y.switch_access.next.setting";
120 // A pref that stores the key code for the "previous" action.
121 const char kAccessibilitySwitchAccessPreviousKeyCodes[] =
122     "settings.a11y.switch_access.previous.key_codes";
123 // A pref that stores the setting value for the "previous" action.
124 const char kAccessibilitySwitchAccessPreviousSetting[] =
125     "settings.a11y.switch_access.previous.setting";
126 // A boolean pref which determines whether auto-scanning is enabled within
127 // Switch Access.
128 const char kAccessibilitySwitchAccessAutoScanEnabled[] =
129     "settings.a11y.switch_access.auto_scan.enabled";
130 // An integer pref which determines time delay in ms before automatically
131 // scanning forward (when auto-scan is enabled).
132 const char kAccessibilitySwitchAccessAutoScanSpeedMs[] =
133     "settings.a11y.switch_access.auto_scan.speed_ms";
134 // An integer pref which determines time delay in ms before automatically
135 // scanning forward while navigating the keyboard (when auto-scan is
136 // enabled).
137 const char kAccessibilitySwitchAccessAutoScanKeyboardSpeedMs[] =
138     "settings.a11y.switch_access.auto_scan.keyboard.speed_ms";
139 // A boolean pref which, if set, indicates that shelf navigation buttons (home,
140 // back and overview button) should be shown in tablet mode. Note that shelf
141 // buttons might be shown even if the pref value is false - for example, if
142 // spoken feedback, autoclick or switch access are enabled.
143 const char kAccessibilityTabletModeShelfNavigationButtonsEnabled[] =
144     "settings.a11y.tablet_mode_shelf_nav_buttons_enabled";
145 // A boolean pref which determines whether dictation is enabled.
146 const char kAccessibilityDictationEnabled[] = "settings.a11y.dictation";
147 // A boolean pref which determines whether the accessibility menu shows
148 // regardless of the state of a11y features.
149 const char kShouldAlwaysShowAccessibilityMenu[] = "settings.a11y.enable_menu";
150 
151 // A dictionary storing the number of times and most recent time all contextual
152 // tooltips have been shown.
153 const char kContextualTooltips[] = "settings.contextual_tooltip.shown_info";
154 
155 // A list containing the stored virtual desks names in the same order of the
156 // desks in the overview desks bar. This list will be used to restore the desks,
157 // their order, and their names for the primary user on first signin. If a desk
158 // hasn't been renamed by the user (i.e. it uses one of the default
159 // automatically-assigned desk names such as "Desk 1", "Desk 2", ... etc.), its
160 // name will appear in this list as an empty string. The desk names are stored
161 // as UTF8 strings.
162 const char kDesksNamesList[] = "ash.desks.desks_names_list";
163 // An integer index of a user's active desk.
164 const char kDesksActiveDesk[] = "ash.desks.active_desk";
165 
166 // A boolean pref storing the enabled status of the Docked Magnifier feature.
167 const char kDockedMagnifierEnabled[] = "ash.docked_magnifier.enabled";
168 // A double pref storing the scale value of the Docked Magnifier feature by
169 // which the screen is magnified.
170 const char kDockedMagnifierScale[] = "ash.docked_magnifier.scale";
171 
172 // A boolean pref which indicates whether the docked magnifier confirmation
173 // dialog has ever been shown.
174 const char kDockedMagnifierAcceleratorDialogHasBeenAccepted[] =
175     "settings.a11y.docked_magnifier_accelerator_dialog_has_been_accepted";
176 // A boolean pref which indicates whether the high contrast magnifier
177 // confirmation dialog has ever been shown.
178 const char kHighContrastAcceleratorDialogHasBeenAccepted[] =
179     "settings.a11y.high_contrast_accelerator_dialog_has_been_accepted";
180 // A boolean pref which indicates whether the screen magnifier confirmation
181 // dialog has ever been shown.
182 const char kScreenMagnifierAcceleratorDialogHasBeenAccepted[] =
183     "settings.a11y.screen_magnifier_accelerator_dialog_has_been_accepted";
184 // A boolean pref which indicates whether the dictation confirmation dialog has
185 // ever been shown.
186 const char kDictationAcceleratorDialogHasBeenAccepted[] =
187     "settings.a11y.dictation_accelerator_dialog_has_been_accepted";
188 // A boolean pref which indicates whether the display rotation confirmation
189 // dialog has ever been shown.
190 // Renamed 10/2019 to force reset the pref to false.
191 const char kDisplayRotationAcceleratorDialogHasBeenAccepted2[] =
192     "settings.a11y.display_rotation_accelerator_dialog_has_been_accepted2";
193 
194 // A dictionary pref that stores the mixed mirror mode parameters.
195 const char kDisplayMixedMirrorModeParams[] =
196     "settings.display.mixed_mirror_mode_param";
197 // Power state of the current displays from the last run.
198 const char kDisplayPowerState[] = "settings.display.power_state";
199 // A dictionary pref that stores per display preferences.
200 const char kDisplayProperties[] = "settings.display.properties";
201 // Boolean controlling whether privacy screen is enabled.
202 const char kDisplayPrivacyScreenEnabled[] =
203     "settings.display.privacy_screen_enabled";
204 // A dictionary pref that specifies the state of the rotation lock, and the
205 // display orientation, for the internal display.
206 const char kDisplayRotationLock[] = "settings.display.rotation_lock";
207 // A dictionary pref that stores the touch associations for the device.
208 const char kDisplayTouchAssociations[] = "settings.display.touch_associations";
209 // A dictionary pref that stores the port mapping for touch devices.
210 const char kDisplayTouchPortAssociations[] =
211     "settings.display.port_associations";
212 // A list pref that stores the mirror info for each external display.
213 const char kExternalDisplayMirrorInfo[] =
214     "settings.display.external_display_mirror_info";
215 // A dictionary pref that specifies per-display layout/offset information.
216 // Its key is the ID of the display and its value is a dictionary for the
217 // layout/offset information.
218 const char kSecondaryDisplays[] = "settings.display.secondary_displays";
219 
220 // A boolean pref that enable fullscreen alert bubble.
221 // TODO(zxdan): Change to an allowlist in M89.
222 const char kFullscreenAlertEnabled[] = "ash.fullscreen_alert_enabled";
223 
224 // A boolean pref storing whether the gesture education notification has ever
225 // been shown to the user, which we use to stop showing it again.
226 const char kGestureEducationNotificationShown[] =
227     "ash.gesture_education.notification_shown";
228 
229 // A boolean pref which stores whether a stylus has been seen before.
230 const char kHasSeenStylus[] = "ash.has_seen_stylus";
231 // A boolean pref which stores whether a the palette warm welcome bubble
232 // (displayed when a user first uses a stylus) has been shown before.
233 const char kShownPaletteWelcomeBubble[] = "ash.shown_palette_welcome_bubble";
234 // A boolean pref that specifies if the stylus tools should be enabled/disabled.
235 const char kEnableStylusTools[] = "settings.enable_stylus_tools";
236 // A boolean pref that specifies if the ash palette should be launched after an
237 // eject input event has been received.
238 const char kLaunchPaletteOnEjectEvent[] =
239     "settings.launch_palette_on_eject_event";
240 
241 // Boolean pref indicating whether the privacy warning of the managed-guest
242 // session on both; the login screen and inside the auto-launched session,
243 // should be displayed or not.
244 const char kManagedGuestSessionPrivacyWarningsEnabled[] =
245     "managed_session.privacy_warning_enabled";
246 
247 // A string pref storing the type of lock screen notification mode.
248 // "show" -> show notifications on the lock screen
249 // "hide" -> hide notifications at all on the lock screen (default)
250 // "hideSensitive" -> hide sensitive content on the lock screen
251 // (other values are treated as "hide")
252 const char kMessageCenterLockScreenMode[] =
253     "ash.message_center.lock_screen_mode";
254 
255 // Value of each options of the lock screen notification settings. They are
256 // used the pref of ash::prefs::kMessageCenterLockScreenMode.
257 const char kMessageCenterLockScreenModeShow[] = "show";
258 const char kMessageCenterLockScreenModeHide[] = "hide";
259 const char kMessageCenterLockScreenModeHideSensitive[] = "hideSensitive";
260 
261 // A boolean pref storing the enabled status of the ambient color feature.
262 const char kAmbientColorEnabled[] = "ash.ambient_color.enabled";
263 
264 // A boolean pref storing the enabled status of the NightLight feature.
265 const char kNightLightEnabled[] = "ash.night_light.enabled";
266 
267 // A double pref storing the screen color temperature set by the NightLight
268 // feature. The expected values are in the range of 0.0 (least warm) and 1.0
269 // (most warm).
270 const char kNightLightTemperature[] = "ash.night_light.color_temperature";
271 
272 // An integer pref storing the type of automatic scheduling of turning on and
273 // off the NightLight feature. Valid values are:
274 // 0 -> NightLight is never turned on or off automatically.
275 // 1 -> NightLight is turned on and off at the sunset and sunrise times
276 // respectively.
277 // 2 -> NightLight schedule times are explicitly set by the user.
278 //
279 // See ash::NightLightController::ScheduleType.
280 const char kNightLightScheduleType[] = "ash.night_light.schedule_type";
281 
282 // Integer prefs storing the start and end times of the automatic schedule at
283 // which NightLight turns on and off respectively when the schedule type is set
284 // to a custom schedule. The times are represented as the number of minutes from
285 // 00:00 (12:00 AM) regardless of the date or the timezone.
286 // See ash::TimeOfDayTime.
287 const char kNightLightCustomStartTime[] = "ash.night_light.custom_start_time";
288 const char kNightLightCustomEndTime[] = "ash.night_light.custom_end_time";
289 
290 // Double prefs storing the most recent valid geoposition, which is only used
291 // when the device lacks connectivity and we're unable to retrieve a valid
292 // geoposition to calculate the sunset / sunrise times.
293 const char kNightLightCachedLatitude[] = "ash.night_light.cached_latitude";
294 const char kNightLightCachedLongitude[] = "ash.night_light.cached_longitude";
295 
296 // A boolean pref storing whether the AutoNightLight notification has ever been
297 // dismissed by the user, which we use to stop showing it again.
298 const char kAutoNightLightNotificationDismissed[] =
299     "ash.auto_night_light.notification_dismissed";
300 
301 // Whether the Chrome OS lock screen is allowed.
302 const char kAllowScreenLock[] = "allow_screen_lock";
303 
304 // A boolean pref that turns on automatic screen locking.
305 const char kEnableAutoScreenLock[] = "settings.enable_screen_lock";
306 
307 // Screen brightness percent values to be used when running on AC power.
308 // Specified by the policy.
309 const char kPowerAcScreenBrightnessPercent[] =
310     "power.ac_screen_brightness_percent";
311 
312 // Inactivity time in milliseconds while the system is on AC power before
313 // the screen should be dimmed, turned off, or locked, before an
314 // IdleActionImminent D-Bus signal should be sent, or before
315 // kPowerAcIdleAction should be performed.  0 disables the delay (N/A for
316 // kPowerAcIdleDelayMs).
317 const char kPowerAcScreenDimDelayMs[] = "power.ac_screen_dim_delay_ms";
318 const char kPowerAcScreenOffDelayMs[] = "power.ac_screen_off_delay_ms";
319 const char kPowerAcScreenLockDelayMs[] = "power.ac_screen_lock_delay_ms";
320 const char kPowerAcIdleWarningDelayMs[] = "power.ac_idle_warning_delay_ms";
321 
322 // Screen brightness percent values to be used when running on battery power.
323 // Specified by the policy.
324 const char kPowerBatteryScreenBrightnessPercent[] =
325     "power.battery_screen_brightness_percent";
326 
327 // Similar delays while the system is on battery power.
328 const char kPowerBatteryScreenDimDelayMs[] =
329     "power.battery_screen_dim_delay_ms";
330 const char kPowerBatteryScreenOffDelayMs[] =
331     "power.battery_screen_off_delay_ms";
332 const char kPowerBatteryScreenLockDelayMs[] =
333     "power.battery_screen_lock_delay_ms";
334 const char kPowerBatteryIdleWarningDelayMs[] =
335     "power.battery_idle_warning_delay_ms";
336 const char kPowerBatteryIdleDelayMs[] = "power.battery_idle_delay_ms";
337 const char kPowerAcIdleDelayMs[] = "power.ac_idle_delay_ms";
338 
339 // Inactivity delays used to dim the screen or turn it off while the screen is
340 // locked.
341 const char kPowerLockScreenDimDelayMs[] = "power.lock_screen_dim_delay_ms";
342 const char kPowerLockScreenOffDelayMs[] = "power.lock_screen_off_delay_ms";
343 
344 // Action that should be performed when the idle delay is reached while the
345 // system is on AC power or battery power.
346 // Values are from the chromeos::PowerPolicyController::Action enum.
347 const char kPowerAcIdleAction[] = "power.ac_idle_action";
348 const char kPowerBatteryIdleAction[] = "power.battery_idle_action";
349 
350 // Action that should be performed when the lid is closed.
351 // Values are from the chromeos::PowerPolicyController::Action enum.
352 const char kPowerLidClosedAction[] = "power.lid_closed_action";
353 
354 // Should audio and video activity be used to disable the above delays?
355 const char kPowerUseAudioActivity[] = "power.use_audio_activity";
356 const char kPowerUseVideoActivity[] = "power.use_video_activity";
357 
358 // Should extensions, ARC apps, and other code within Chrome be able to override
359 // system power management (preventing automatic actions like sleeping, locking,
360 // or screen dimming)?
361 const char kPowerAllowWakeLocks[] = "power.allow_wake_locks";
362 
363 // Should extensions, ARC apps, and other code within Chrome be able to override
364 // display-related power management? (Disallowing wake locks in general takes
365 // precedence over this.)
366 const char kPowerAllowScreenWakeLocks[] = "power.allow_screen_wake_locks";
367 
368 // Amount by which the screen-dim delay should be scaled while the system
369 // is in presentation mode. Values are limited to a minimum of 1.0.
370 const char kPowerPresentationScreenDimDelayFactor[] =
371     "power.presentation_screen_dim_delay_factor";
372 
373 // Amount by which the screen-dim delay should be scaled when user activity is
374 // observed while the screen is dimmed or soon after the screen has been turned
375 // off.  Values are limited to a minimum of 1.0.
376 const char kPowerUserActivityScreenDimDelayFactor[] =
377     "power.user_activity_screen_dim_delay_factor";
378 
379 // Whether the power management delays should start running only after the first
380 // user activity has been observed in a session.
381 const char kPowerWaitForInitialUserActivity[] =
382     "power.wait_for_initial_user_activity";
383 
384 // Boolean controlling whether the panel backlight should be forced to a
385 // nonzero level when user activity is observed.
386 const char kPowerForceNonzeroBrightnessForUserActivity[] =
387     "power.force_nonzero_brightness_for_user_activity";
388 
389 // Boolean controlling whether a shorter suspend delay should be used after the
390 // user forces the display off by pressing the power button. Provided to allow
391 // policy to control this behavior.
392 const char kPowerFastSuspendWhenBacklightsForcedOff[] =
393     "power.fast_suspend_when_backlights_forced_off";
394 
395 // Boolean controlling whether smart dim model is enabled.
396 const char kPowerSmartDimEnabled[] = "power.smart_dim_enabled";
397 
398 // Boolean controlling whether ALS logging is enabled.
399 const char kPowerAlsLoggingEnabled[] = "power.als_logging_enabled";
400 
401 // Boolean controlling whether the settings is enabled. This pref is intended to
402 // be set only by policy not by user.
403 const char kOsSettingsEnabled[] = "os_settings_enabled";
404 
405 // |kShelfAlignment| and |kShelfAutoHideBehavior| have a local variant. The
406 // local variant is not synced and is used if set. If the local variant is not
407 // set its value is set from the synced value (once prefs have been
408 // synced). This gives a per-machine setting that is initialized from the last
409 // set value.
410 // These values are default on the machine but can be overridden by per-display
411 // values in kShelfPreferences (unless overridden by managed policy).
412 // String value corresponding to ash::ShelfAlignment (e.g. "Bottom").
413 const char kShelfAlignment[] = "shelf_alignment";
414 const char kShelfAlignmentLocal[] = "shelf_alignment_local";
415 // String value corresponding to ash::ShelfAutoHideBehavior (e.g. "Never").
416 const char kShelfAutoHideBehavior[] = "auto_hide_behavior";
417 const char kShelfAutoHideBehaviorLocal[] = "auto_hide_behavior_local";
418 // Dictionary value that holds per-display preference of shelf alignment and
419 // auto-hide behavior. Key of the dictionary is the id of the display, and
420 // its value is a dictionary whose keys are kShelfAlignment and
421 // kShelfAutoHideBehavior.
422 const char kShelfPreferences[] = "shelf_preferences";
423 
424 // Boolean pref indicating whether to show a logout button in the system tray.
425 const char kShowLogoutButtonInTray[] = "show_logout_button_in_tray";
426 
427 // Integer pref indicating the length of time in milliseconds for which a
428 // confirmation dialog should be shown when the user presses the logout button.
429 // A value of 0 indicates that logout should happen immediately, without showing
430 // a confirmation dialog.
431 const char kLogoutDialogDurationMs[] = "logout_dialog_duration_ms";
432 
433 // A dictionary pref that maps usernames to wallpaper info.
434 const char kUserWallpaperInfo[] = "user_wallpaper_info";
435 
436 // A dictionary pref that maps wallpaper file paths to their prominent colors.
437 const char kWallpaperColors[] = "ash.wallpaper.prominent_colors";
438 
439 // Boolean pref indicating whether a user has enabled the bluetooth adapter.
440 const char kUserBluetoothAdapterEnabled[] =
441     "ash.user.bluetooth.adapter_enabled";
442 
443 // Boolean pref indicating system-wide setting for bluetooth adapter power.
444 const char kSystemBluetoothAdapterEnabled[] =
445     "ash.system.bluetooth.adapter_enabled";
446 
447 // A boolean pref which determines whether tap-dragging is enabled.
448 const char kTapDraggingEnabled[] = "settings.touchpad.enable_tap_dragging";
449 
450 // Boolean prefs for the status of the touchscreen and the touchpad.
451 const char kTouchpadEnabled[] = "events.touch_pad.enabled";
452 const char kTouchscreenEnabled[] = "events.touch_screen.enabled";
453 
454 // String pref storing the salt for the pin quick unlock mechanism.
455 const char kQuickUnlockPinSalt[] = "quick_unlock.pin.salt";
456 
457 // Dictionary prefs in local state that keeps information about detachable
458 // bases - for exmaple the last used base per user.
459 const char kDetachableBaseDevices[] = "ash.detachable_base.devices";
460 
461 // Pref storing the number of sessions in which Assistant onboarding was shown.
462 const char kAssistantNumSessionsWhereOnboardingShown[] =
463     "ash.assistant.num_sessions_where_onboarding_shown";
464 
465 // Pref storing the time of the last Assistant interaction.
466 const char kAssistantTimeOfLastInteraction[] =
467     "ash.assistant.time_of_last_interaction";
468 
469 // Whether the user is allowed to disconnect and configure VPN connections.
470 const char kVpnConfigAllowed[] = "vpn_config_allowed";
471 
472 // A boolean pref that indicates whether power peak shift is enabled.
473 // Ignored unless powerd is configured to honor charging-related prefs.
474 const char kPowerPeakShiftEnabled[] = "ash.power.peak_shift_enabled";
475 
476 // An integer pref that specifies the power peak shift battery threshold in
477 // percent.
478 // Ignored unless powerd is configured to honor charging-related prefs.
479 const char kPowerPeakShiftBatteryThreshold[] =
480     "ash.power.peak_shift_battery_threshold";
481 
482 // A dictionary pref that specifies the power peak shift day configs.
483 // For details see "DevicePowerPeakShiftDayConfig" in policy_templates.json.
484 // Ignored unless powerd is configured to honor charging-related prefs.
485 const char kPowerPeakShiftDayConfig[] = "ash.power.peak_shift_day_config";
486 
487 // A boolean pref that indicates whether boot on AC is enabled.
488 const char kBootOnAcEnabled[] = "ash.power.boot_on_ac_enabled";
489 
490 // A boolean pref that indicates whether advanced battery charge mode is
491 // enabled.
492 // Ignored unless powerd is configured to honor charging-related prefs.
493 const char kAdvancedBatteryChargeModeEnabled[] =
494     "ash.power.advanced_battery_charge_mode_enabled";
495 
496 // A dictionary pref that specifies the advanced battery charge mode day config.
497 // For details see "DeviceAdvancedBatteryChargeModeDayConfig" in
498 // policy_templates.json.
499 // Ignored unless powerd is configured to honor charging-related prefs.
500 const char kAdvancedBatteryChargeModeDayConfig[] =
501     "ash.power.advanced_battery_charge_mode_day_config";
502 
503 // An integer pref that specifies the battery charge mode.
504 // For details see "DeviceBatteryChargeMode" in policy_templates.json.
505 // Ignored unless powerd is configured to honor charging-related prefs.
506 const char kBatteryChargeMode[] = "ash.power.battery_charge_mode";
507 
508 // An integer pref that specifies the battery charge custom start charging in
509 // percent.
510 // For details see "DeviceBatteryChargeCustomStartCharging" in
511 // policy_templates.json.
512 // Ignored unless powerd is configured to honor charging-related prefs.
513 const char kBatteryChargeCustomStartCharging[] =
514     "ash.power.battery_charge_custom_start_charging";
515 
516 // An integer pref that specifies the battery charge custom stop charging in
517 // percent.
518 // For details see "DeviceBatteryChargeCustomStopCharging" in
519 // policy_templates.json.
520 // Ignored unless powerd is configured to honor charging-related prefs.
521 const char kBatteryChargeCustomStopCharging[] =
522     "ash.power.battery_charge_custom_stop_charging";
523 
524 // A boolean pref that indicates whether USB power share is enabled.
525 // For details see "DeviceUsbPowerShareEnabled" in policy_templates.json.
526 // Ignored unless powerd is configured to honor charging-related prefs.
527 const char kUsbPowerShareEnabled[] = "ash.power.usb_power_share_enabled";
528 
529 // An integer pref that specifies how many times the Assistant privacy info has
530 // been shown in Launcher. This value will increment by one every time when
531 // Launcher changes state from Peeking to Half or FullscreenSearch up to a
532 // predefined threshold, e.g. six times. If the info has been shown for more
533 // than the threshold, do not show the privacy info any more.
534 const char kAssistantPrivacyInfoShownInLauncher[] =
535     "ash.launcher.assistant_privacy_info_shown";
536 
537 // A boolean pref that indicates whether the Assistant privacy info may be
538 // displayed to user. A false value indicates that the info can be displayed if
539 // the value of |kAssistantPrivacyInfoShownInLauncher| is smaller than the
540 // predefined threshold. A true value implies that the user has dismissed the
541 // info view, and do not show the privacy info any more.
542 const char kAssistantPrivacyInfoDismissedInLauncher[] =
543     "ash.launcher.assistant_privacy_info_dismissed";
544 
545 // An integer pref that specifies how many times the Suggested Content privacy
546 // info has been shown in Launcher. This value will increment by one every time
547 // when Launcher changes state from Peeking to Half or FullscreenSearch up to a
548 // predefined threshold, e.g. six times. If the info has been shown for more
549 // than the threshold, do not show the privacy info any more.
550 const char kSuggestedContentInfoShownInLauncher[] =
551     "ash.launcher.suggested_content_info_shown";
552 
553 // A boolean pref that indicates whether the Suggested Content privacy info may
554 // be displayed to user. A false value indicates that the info can be displayed
555 // if the value of |kSuggestedContentInfoShownInLauncher| is smaller than the
556 // predefined threshold. A true value implies that the user has dismissed the
557 // info view, and do not show the privacy info any more.
558 const char kSuggestedContentInfoDismissedInLauncher[] =
559     "ash.launcher.suggested_content_info_dismissed";
560 
561 // A boolean pref that indicates whether lock screen media controls are enabled.
562 // Controlled by user policy.
563 const char kLockScreenMediaControlsEnabled[] =
564     "ash.lock_screen_media_controls_enabled";
565 
566 // Boolean pref which determines whether key repeat is enabled.
567 const char kXkbAutoRepeatEnabled[] =
568     "settings.language.xkb_auto_repeat_enabled_r2";
569 
570 // Integer pref which determines key repeat delay (in ms).
571 const char kXkbAutoRepeatDelay[] = "settings.language.xkb_auto_repeat_delay_r2";
572 
573 // Integer pref which determines key repeat interval (in ms).
574 const char kXkbAutoRepeatInterval[] =
575     "settings.language.xkb_auto_repeat_interval_r2";
576 // "_r2" suffixes were added to the three prefs above when we changed the
577 // preferences to not be user-configurable or sync with the cloud. The prefs are
578 // now user-configurable and syncable again, but we don't want to overwrite the
579 // current values with the old synced values, so we continue to use this suffix.
580 
581 // A boolean pref which is true if touchpad reverse scroll is enabled.
582 const char kNaturalScroll[] = "settings.touchpad.natural_scroll";
583 // A boolean pref which is true if mouse reverse scroll is enabled.
584 const char kMouseReverseScroll[] = "settings.mouse.reverse_scroll";
585 
586 // A dictionary storing the number of times and most recent time the multipaste
587 // contextual nudge was shown.
588 const char kMultipasteNudges[] = "ash.clipboard.multipaste_nudges";
589 
590 // A boolean pref that indicates whether dark mode is enabled.
591 const char kDarkModeEnabled[] = "cros.system.dark_mode_enabled";
592 // A boolean pref that indicates whether the color mode is themed. If true, the
593 // background color will be calculated based on extracted wallpaper color.
594 const char kColorModeThemed[] = "cros.system.color_mode_themed";
595 
596 // A boolean pref that indicates whether app badging is shown in launcher and
597 // shelf.
598 const char kAppNotificationBadgingEnabled[] =
599     "ash.app_notification_badging_enabled";
600 
601 // An integer pref that indicates whether global media controls is pinned to
602 // shelf or it's unset and need to be determined by screen size during runtime.
603 const char kGlobalMediaControlsPinned[] =
604     "ash.system.global_media_controls_pinned";
605 
606 // NOTE: New prefs should start with the "ash." prefix. Existing prefs moved
607 // into this file should not be renamed, since they may be synced.
608 
609 }  // namespace prefs
610 
611 }  // namespace ash
612