123730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)// Copyright 2014 The Chromium Authors. All rights reserved.
223730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
323730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)// found in the LICENSE file.
423730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)
523730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)#include "components/sync_driver/pref_names.h"
623730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)
723730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)namespace sync_driver {
823730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)
923730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)namespace prefs {
1023730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)
1123730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)// Set to true when enhanced bookmarks experiment is enabled via Chrome sync.
1223730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kEnhancedBookmarksExperimentEnabled[] = "enhanced_bookmarks_enabled";
1323730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)
1423730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)// Enhanced bookmarks extension id passed via Chrome sync.
1523730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kEnhancedBookmarksExtensionId[] = "enhanced_bookmarks_extension_id";
1623730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)
1723730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)// 64-bit integer serialization of the base::Time when the last sync occurred.
1823730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kSyncLastSyncedTime[] = "sync.last_synced_time";
1923730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)
2023730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)// Boolean specifying whether the user finished setting up sync.
2123730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kSyncHasSetupCompleted[] = "sync.has_setup_completed";
2223730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)
2323730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)// Boolean specifying whether sync has an auth error.
2423730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kSyncHasAuthError[] = "sync.has_auth_error";
2523730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)
2623730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)// Boolean specifying whether to automatically sync all data types (including
2723730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)// future ones, as they're added).  If this is true, the following preferences
2823730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)// (kSyncBookmarks, kSyncPasswords, etc.) can all be ignored.
2923730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kSyncKeepEverythingSynced[] = "sync.keep_everything_synced";
3023730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)
3123730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)// Booleans specifying whether the user has selected to sync the following
3223730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)// datatypes.
3323730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kSyncAppList[] = "sync.app_list";
3423730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kSyncAppNotifications[] = "sync.app_notifications";
3523730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kSyncAppSettings[] = "sync.app_settings";
3623730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kSyncApps[] = "sync.apps";
37116680a4aac90f2aa7413d9095a592090648e557Ben Murdochconst char kSyncArticles[] = "sync.articles";
3823730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kSyncAutofillProfile[] = "sync.autofill_profile";
3923730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kSyncAutofill[] = "sync.autofill";
4023730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kSyncBookmarks[] = "sync.bookmarks";
411320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucciconst char kSyncDeviceInfo[] = "sync.device_info";
4223730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kSyncDictionary[] = "sync.dictionary";
4323730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kSyncExtensionSettings[] = "sync.extension_settings";
4423730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kSyncExtensions[] = "sync.extensions";
4523730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kSyncFaviconImages[] = "sync.favicon_images";
4623730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kSyncFaviconTracking[] = "sync.favicon_tracking";
4723730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kSyncHistoryDeleteDirectives[] = "sync.history_delete_directives";
4823730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kSyncPasswords[] = "sync.passwords";
4923730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kSyncPreferences[] = "sync.preferences";
5023730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kSyncPriorityPreferences[] = "sync.priority_preferences";
5123730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kSyncSearchEngines[] = "sync.search_engines";
5223730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kSyncSessions[] = "sync.sessions";
53116680a4aac90f2aa7413d9095a592090648e557Ben Murdochconst char kSyncSupervisedUserSettings[] = "sync.managed_user_settings";
54116680a4aac90f2aa7413d9095a592090648e557Ben Murdochconst char kSyncSupervisedUserSharedSettings[] =
55116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch    "sync.managed_user_shared_settings";
56116680a4aac90f2aa7413d9095a592090648e557Ben Murdochconst char kSyncSupervisedUsers[] = "sync.managed_users";
5723730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kSyncSyncedNotificationAppInfo[] =
5823730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)    "sync.synced_notification_app_info";
5923730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kSyncSyncedNotifications[] = "sync.synced_notifications";
6023730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kSyncTabs[] = "sync.tabs";
6123730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kSyncThemes[] = "sync.themes";
6223730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kSyncTypedUrls[] = "sync.typed_urls";
6323730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)
6423730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)// Boolean used by enterprise configuration management in order to lock down
6523730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)// sync.
6623730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kSyncManaged[] = "sync.managed";
6723730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)
6823730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)// Boolean to prevent sync from automatically starting up.  This is
6923730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)// used when sync is disabled by the user via the privacy dashboard.
7023730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kSyncSuppressStart[] = "sync.suppress_start";
7123730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)
7223730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)// A string that can be used to restore sync encryption infrastructure on
7323730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)// startup so that the user doesn't need to provide credentials on each start.
7423730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kSyncEncryptionBootstrapToken[] = "sync.encryption_bootstrap_token";
7523730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)
7623730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)// Same as kSyncEncryptionBootstrapToken, but derived from the keystore key,
7723730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)// so we don't have to do a GetKey command at restart.
7823730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kSyncKeystoreEncryptionBootstrapToken[] =
7923730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)    "sync.keystore_encryption_bootstrap_token";
8023730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)
8123730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)// Boolean tracking whether the user chose to specify a secondary encryption
8223730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)// passphrase.
8323730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kSyncUsingSecondaryPassphrase[] = "sync.using_secondary_passphrase";
8423730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)
8523730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)// List of the currently acknowledged set of sync types, used to figure out
8623730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)// if a new sync type has rolled out so we can notify the user.
8723730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kSyncAcknowledgedSyncTypes[] = "sync.acknowledged_types";
8823730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)
8923730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)// The GUID session sync will use to identify this client, even across sync
9023730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)// disable/enable events.
9123730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kSyncSessionsGUID[] = "sync.session_sync_guid";
9223730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)
9323730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)#if defined(OS_CHROMEOS)
9423730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)// A string that is used to store first-time sync startup after once sync is
9523730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)// disabled. This will be refreshed every sign-in.
9623730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)const char kSyncSpareBootstrapToken[] = "sync.spare_bootstrap_token";
9723730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)#endif  // defined(OS_CHROMEOS)
9823730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)
99cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)// Stores how many times to try rollback before giving up.
100cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)const char kSyncRemainingRollbackTries[] = "sync.remaining_rollback_tries";
101cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)
10246d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles)// Stores the timestamp of first sync.
10346d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles)const char kSyncFirstSyncTime[] = "sync.first_sync_time";
10446d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles)
10523730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)}  // namespace prefs
10623730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)
10723730a6e56a168d1879203e4b3819bb36e3d8f1fTorne (Richard Coles)}  // namespace sync_driver
108