// Copyright 2014 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_SYNC_BASE_PREF_NAMES_H_ #define COMPONENTS_SYNC_BASE_PREF_NAMES_H_ #include "build/build_config.h" #include "build/chromeos_buildflags.h" namespace syncer::prefs { // Enabled the local sync backend implemented by the LoopbackServer. inline constexpr char kEnableLocalSyncBackend[] = …; // Specifies the local sync backend directory. The name is chosen to mimic // user-data-dir etc. This flag only matters if the enable-local-sync-backend // flag is present. inline constexpr char kLocalSyncBackendDir[] = …; // NOTE: All the "internal" prefs should not be used directly by non-sync code, // but should rather always be accessed via SyncUserSettings. // TODO(crbug.com/40265119): Clean up/replace any existing references to these // prefs from outside components/sync/. namespace internal { // Boolean specifying whether the user finished setting up sync at least once. // On ChromeOS-Ash, the concept of initial-sync-setup doesn't exist. #if !BUILDFLAG(IS_CHROMEOS_ASH) inline constexpr char kSyncInitialSyncFeatureSetupComplete[] = …; #endif // !BUILDFLAG(IS_CHROMEOS_ASH) // Boolean specifying whether to automatically sync all data types (including // future ones, as they're added). If this is true, the following preferences // (kSyncBookmarks, kSyncPasswords, etc.) can all be ignored. inline constexpr char kSyncKeepEverythingSynced[] = …; // Dict specifying the selected types per account for signed-in, non-syncing // users only. inline constexpr char kSelectedTypesPerAccount[] = …; #if BUILDFLAG(IS_CHROMEOS_ASH) // Boolean specifying whether sync was disabled due to a dashboard reset event. inline constexpr char kSyncDisabledViaDashboard[] = "sync.disabled_via_dashboard"; // Boolean specifying whether to automatically sync all Chrome OS specific data // types (including future ones). This includes types like printers, OS-only // settings, etc. If set, the individual type preferences can be ignored. inline constexpr char kSyncAllOsTypes[] = "sync.all_os_types"; // Booleans specifying whether the user has selected to sync the following // OS user selectable types. inline constexpr char kSyncOsApps[] = "sync.os_apps"; inline constexpr char kSyncOsPreferences[] = "sync.os_preferences"; inline constexpr char kSyncWifiConfigurations[] = "sync.wifi_configurations"; #endif // BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_CHROMEOS_LACROS) // On Lacros, apps sync for primary profile is controlled by the OS. This // preference caches the last known value. inline constexpr char kSyncAppsEnabledByOs[] = "sync.apps_enabled_by_os"; #endif // BUILDFLAG(IS_CHROMEOS_LACROS) // Booleans specifying whether the user has selected to sync the following // user selectable types. Which are also used as keys within // "sync.selected_types_per_account". inline constexpr char kSyncApps[] = …; inline constexpr char kSyncAutofill[] = …; inline constexpr char kSyncBookmarks[] = …; inline constexpr char kSyncCookies[] = …; inline constexpr char kSyncExtensions[] = …; // Note: The pref for history is called "typed_urls" for historic reasons - not // worth the hassle of renaming. inline constexpr char kSyncHistory[] = …; inline constexpr char kSyncPasswords[] = …; inline constexpr char kSyncPayments[] = …; inline constexpr char kSyncPreferences[] = …; inline constexpr char kSyncProductComparison[] = …; inline constexpr char kSyncReadingList[] = …; inline constexpr char kSyncSavedTabGroups[] = …; inline constexpr char kSyncSharedTabGroupData[] = …; inline constexpr char kSyncTabs[] = …; inline constexpr char kSyncThemes[] = …; // Boolean used by enterprise configuration management in order to lock down // sync. inline constexpr char kSyncManaged[] = …; // The type of encryption passphrase used. Determined and set the first time the // engine is successfully initialized. // Note that the actual values correspond to the proto version of // PassphraseType, see ProtoPassphraseInt32ToEnum() etc. inline constexpr char kSyncCachedPassphraseType[] = …; // The user's TrustedVaultAutoUpgradeExperimentGroup, determined the first time // the engine is successfully initialized. inline constexpr char kSyncCachedTrustedVaultAutoUpgradeExperimentGroup[] = …; // A string that can be used to restore sync encryption infrastructure on // startup so that the user doesn't need to provide credentials on each start. inline constexpr char kSyncEncryptionBootstrapToken[] = …; // A dict that can be used to restore per-account the sync encryption // infrastructure on startup so that the user doesn't need to provide // credentials on each start. inline constexpr char kSyncEncryptionBootstrapTokenPerAccount[] = …; // Stores whether a platform specific passphrase error prompt has been muted by // the user (e.g. an Android system notification). Specifically, it stores which // major product version was used to mute this error. inline constexpr char kSyncPassphrasePromptMutedProductVersion[] = …; // Overall status of Sync-the-feature for the Sync-to-Signin migration, // expressed as SyncFeatureStatusForSyncToSigninMigration. inline constexpr char kSyncFeatureStatusForSyncToSigninMigration[] = …; // Prefix for boolean per-data-type statuses, to be suffixed with "." plus // GetDataTypeLowerCaseRootTag(). inline constexpr char kSyncDataTypeStatusForSyncToSigninMigrationPrefix[] = …; inline constexpr char kMigrateReadingListFromLocalToAccount[] = …; } // namespace internal } // namespace syncer::prefs #endif // COMPONENTS_SYNC_BASE_PREF_NAMES_H_