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 
5 #include "components/sync/base/pref_names.h"
6 
7 namespace syncer {
8 
9 namespace prefs {
10 
11 // 64-bit integer serialization of the base::Time when the last sync occurred.
12 const char kSyncLastSyncedTime[] = "sync.last_synced_time";
13 
14 // 64-bit integer serialization of the base::Time of the last sync poll.
15 const char kSyncLastPollTime[] = "sync.last_poll_time";
16 
17 // 64-bit integer serialization of base::TimeDelta storing poll intervals
18 // received by the server (in seconds). For historic reasons, this is called
19 // "short_poll_interval", but it's worth the hassle to rename it.
20 const char kSyncPollIntervalSeconds[] = "sync.short_poll_interval";
21 
22 // Boolean specifying whether the user finished setting up sync at least once.
23 const char kSyncFirstSetupComplete[] = "sync.has_setup_completed";
24 
25 // Boolean specifying whether to automatically sync all data types (including
26 // future ones, as they're added).  If this is true, the following preferences
27 // (kSyncBookmarks, kSyncPasswords, etc.) can all be ignored.
28 const char kSyncKeepEverythingSynced[] = "sync.keep_everything_synced";
29 
30 #if defined(OS_CHROMEOS)
31 // Boolean pref that records whether OS sync preferences were migrated due to
32 // SplitSettingsSync rollout.
33 const char kOsSyncPrefsMigrated[] = "sync.os_sync_prefs_migrated";
34 
35 // Boolean indicating that the user has enabled the Chrome OS system-setting
36 // sync feature.
37 const char kOsSyncFeatureEnabled[] = "sync.os_sync_feature_enabled";
38 
39 // Boolean specifying whether to automatically sync all Chrome OS specific data
40 // types (including future ones). This includes types like printers, OS-only
41 // settings, etc. If set, the individual type preferences can be ignored.
42 const char kSyncAllOsTypes[] = "sync.all_os_types";
43 
44 // Booleans specifying whether the user has selected to sync the following
45 // OS user selectable types.
46 const char kSyncOsApps[] = "sync.os_apps";
47 const char kSyncOsPreferences[] = "sync.os_preferences";
48 #endif  // defined(OS_CHROMEOS)
49 
50 // Booleans specifying whether the user has selected to sync the following
51 // user selectable types.
52 const char kSyncApps[] = "sync.apps";
53 const char kSyncAutofill[] = "sync.autofill";
54 const char kSyncBookmarks[] = "sync.bookmarks";
55 const char kSyncExtensions[] = "sync.extensions";
56 const char kSyncPasswords[] = "sync.passwords";
57 const char kSyncPreferences[] = "sync.preferences";
58 const char kSyncReadingList[] = "sync.reading_list";
59 const char kSyncTabs[] = "sync.tabs";
60 const char kSyncThemes[] = "sync.themes";
61 const char kSyncTypedUrls[] = "sync.typed_urls";
62 const char kSyncWifiConfigurations[] = "sync.wifi_configurations";
63 
64 // Boolean used by enterprise configuration management in order to lock down
65 // sync.
66 const char kSyncManaged[] = "sync.managed";
67 
68 // Boolean whether has requested sync to be enabled. This is set early in the
69 // sync setup flow, after the user has pressed "turn on sync" but before they
70 // have accepted the confirmation dialog (that maps to kSyncFirstSetupComplete).
71 // This is also set to false when sync is disabled by the user in sync settings,
72 // or when sync was reset from the dashboard.
73 const char kSyncRequested[] = "sync.requested";
74 
75 // A string that can be used to restore sync encryption infrastructure on
76 // startup so that the user doesn't need to provide credentials on each start.
77 const char kSyncEncryptionBootstrapToken[] = "sync.encryption_bootstrap_token";
78 
79 // Same as kSyncEncryptionBootstrapToken, but derived from the keystore key,
80 // so we don't have to do a GetKey command at restart.
81 const char kSyncKeystoreEncryptionBootstrapToken[] =
82     "sync.keystore_encryption_bootstrap_token";
83 
84 const char kSyncGaiaId[] = "sync.gaia_id";
85 const char kSyncCacheGuid[] = "sync.cache_guid";
86 const char kSyncBirthday[] = "sync.birthday";
87 const char kSyncBagOfChips[] = "sync.bag_of_chips";
88 
89 // Stores whether a platform specific passphrase error prompt has been shown to
90 // the user (e.g. an Android system notification). Used for out of band prompts
91 // that we only want to use once.
92 const char kSyncPassphrasePrompted[] = "sync.passphrase_prompted";
93 
94 // Dictionary of last seen invalidation versions for each model type.
95 const char kSyncInvalidationVersions[] = "sync.invalidation_versions";
96 
97 // The product version from the last restart of Chrome.
98 const char kSyncLastRunVersion[] = "sync.last_run_version";
99 
100 // Enabled the local sync backend implemented by the LoopbackServer.
101 const char kEnableLocalSyncBackend[] = "sync.enable_local_sync_backend";
102 
103 // Specifies the local sync backend directory. The name is chosen to mimic
104 // user-data-dir etc. This flag only matters if the enable-local-sync-backend
105 // flag is present.
106 const char kLocalSyncBackendDir[] = "sync.local_sync_backend_dir";
107 
108 #if defined(OS_ANDROID)
109 // Stores whether sync should no longer respect the state of master toggle for
110 // this user.
111 // TODO(crbug.com/1107904): Clean pref when the decoupling logic is removed.
112 const char kSyncDecoupledFromAndroidMasterSync[] =
113     "sync.decoupled_from_master_sync";
114 #endif  // defined(OS_ANDROID)
115 
116 }  // namespace prefs
117 
118 }  // namespace syncer
119