pref_names.h 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. // Copyright 2014 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. #ifndef COMPONENTS_SYNC_BASE_PREF_NAMES_H_
  5. #define COMPONENTS_SYNC_BASE_PREF_NAMES_H_
  6. #include "build/build_config.h"
  7. #include "build/chromeos_buildflags.h"
  8. namespace syncer::prefs {
  9. // Boolean specifying whether the user finished setting up sync at least once.
  10. inline constexpr char kSyncFirstSetupComplete[] = "sync.has_setup_completed";
  11. // Boolean specifying whether to automatically sync all data types (including
  12. // future ones, as they're added). If this is true, the following preferences
  13. // (kSyncBookmarks, kSyncPasswords, etc.) can all be ignored.
  14. inline constexpr char kSyncKeepEverythingSynced[] =
  15. "sync.keep_everything_synced";
  16. #if BUILDFLAG(IS_CHROMEOS_ASH)
  17. // Boolean pref that records whether OS sync preferences were migrated due to
  18. // SyncSettingsCategorization rollout.
  19. inline constexpr char kOsSyncPrefsMigrated[] = "sync.os_sync_prefs_migrated";
  20. // Boolean specifying whether to automatically sync all Chrome OS specific data
  21. // types (including future ones). This includes types like printers, OS-only
  22. // settings, etc. If set, the individual type preferences can be ignored.
  23. inline constexpr char kSyncAllOsTypes[] = "sync.all_os_types";
  24. // Booleans specifying whether the user has selected to sync the following
  25. // OS user selectable types.
  26. inline constexpr char kSyncOsApps[] = "sync.os_apps";
  27. inline constexpr char kSyncOsPreferences[] = "sync.os_preferences";
  28. #endif // BUILDFLAG(IS_CHROMEOS_ASH)
  29. #if BUILDFLAG(IS_CHROMEOS_LACROS)
  30. // On Lacros, apps sync for primary profile is controlled by the OS. This
  31. // preference caches the last known value.
  32. inline constexpr char kSyncAppsEnabledByOs[] = "sync.apps_enabled_by_os";
  33. #endif // BUILDFLAG(IS_CHROMEOS_LACROS)
  34. // Booleans specifying whether the user has selected to sync the following
  35. // user selectable types.
  36. inline constexpr char kSyncApps[] = "sync.apps";
  37. inline constexpr char kSyncAutofill[] = "sync.autofill";
  38. inline constexpr char kSyncBookmarks[] = "sync.bookmarks";
  39. inline constexpr char kSyncExtensions[] = "sync.extensions";
  40. inline constexpr char kSyncPasswords[] = "sync.passwords";
  41. inline constexpr char kSyncPreferences[] = "sync.preferences";
  42. inline constexpr char kSyncReadingList[] = "sync.reading_list";
  43. inline constexpr char kSyncTabs[] = "sync.tabs";
  44. inline constexpr char kSyncThemes[] = "sync.themes";
  45. inline constexpr char kSyncTypedUrls[] = "sync.typed_urls";
  46. inline constexpr char kSyncWifiConfigurations[] = "sync.wifi_configurations";
  47. // Boolean used by enterprise configuration management in order to lock down
  48. // sync.
  49. inline constexpr char kSyncManaged[] = "sync.managed";
  50. // Boolean whether has requested sync to be enabled. This is set early in the
  51. // sync setup flow, after the user has pressed "turn on sync" but before they
  52. // have accepted the confirmation dialog (that maps to kSyncFirstSetupComplete).
  53. // This is also set to false when sync is disabled by the user in sync settings,
  54. // or when sync was reset from the dashboard.
  55. inline constexpr char kSyncRequested[] = "sync.requested";
  56. // A string that can be used to restore sync encryption infrastructure on
  57. // startup so that the user doesn't need to provide credentials on each start.
  58. inline constexpr char kSyncEncryptionBootstrapToken[] =
  59. "sync.encryption_bootstrap_token";
  60. // Stores whether a platform specific passphrase error prompt has been muted by
  61. // the user (e.g. an Android system notification). Specifically, it stores which
  62. // major product version was used to mute this error.
  63. inline constexpr char kSyncPassphrasePromptMutedProductVersion[] =
  64. "sync.passphrase_prompt_muted_product_version";
  65. // Enabled the local sync backend implemented by the LoopbackServer.
  66. inline constexpr char kEnableLocalSyncBackend[] =
  67. "sync.enable_local_sync_backend";
  68. // Specifies the local sync backend directory. The name is chosen to mimic
  69. // user-data-dir etc. This flag only matters if the enable-local-sync-backend
  70. // flag is present.
  71. inline constexpr char kLocalSyncBackendDir[] = "sync.local_sync_backend_dir";
  72. } // namespace syncer::prefs
  73. #endif // COMPONENTS_SYNC_BASE_PREF_NAMES_H_