OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_SYNC_SYNC_PREFS_H_ | 5 #ifndef CHROME_BROWSER_SYNC_SYNC_PREFS_H_ |
6 #define CHROME_BROWSER_SYNC_SYNC_PREFS_H_ | 6 #define CHROME_BROWSER_SYNC_SYNC_PREFS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 // Changes are still made to the prefs even if | 88 // Changes are still made to the prefs even if |
89 // HasKeepEverythingSynced() is true, but won't be visible until | 89 // HasKeepEverythingSynced() is true, but won't be visible until |
90 // SetKeepEverythingSynced(false) is called. | 90 // SetKeepEverythingSynced(false) is called. |
91 void SetPreferredDataTypes( | 91 void SetPreferredDataTypes( |
92 syncable::ModelTypeSet registered_types, | 92 syncable::ModelTypeSet registered_types, |
93 syncable::ModelTypeSet preferred_types); | 93 syncable::ModelTypeSet preferred_types); |
94 | 94 |
95 // This pref is set outside of sync. | 95 // This pref is set outside of sync. |
96 bool IsManaged() const; | 96 bool IsManaged() const; |
97 | 97 |
| 98 // Use this encryption bootstrap token once already syncing. |
98 std::string GetEncryptionBootstrapToken() const; | 99 std::string GetEncryptionBootstrapToken() const; |
99 void SetEncryptionBootstrapToken(const std::string& token); | 100 void SetEncryptionBootstrapToken(const std::string& token); |
100 | 101 |
| 102 #if defined(OS_CHROMEOS) |
| 103 // Use this spare bootstrap token only when setting up sync for the first |
| 104 // time. |
| 105 std::string GetSpareBootstrapToken() const; |
| 106 void SetSpareBootstrapToken(const std::string& token); |
| 107 #endif |
| 108 |
101 // InvalidationVersionTracker implementation. | 109 // InvalidationVersionTracker implementation. |
102 virtual sync_notifier::InvalidationVersionMap | 110 virtual sync_notifier::InvalidationVersionMap |
103 GetAllMaxVersions() const OVERRIDE; | 111 GetAllMaxVersions() const OVERRIDE; |
104 virtual void SetMaxVersion(syncable::ModelType model_type, | 112 virtual void SetMaxVersion(syncable::ModelType model_type, |
105 int64 max_version) OVERRIDE; | 113 int64 max_version) OVERRIDE; |
106 | 114 |
107 // Merges the given set of types with the set of acknowledged types. | 115 // Merges the given set of types with the set of acknowledged types. |
108 void AcknowledgeSyncedTypes(syncable::ModelTypeSet types); | 116 void AcknowledgeSyncedTypes(syncable::ModelTypeSet types); |
109 | 117 |
110 // content::NotificationObserver implementation. | 118 // content::NotificationObserver implementation. |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 // etc. | 160 // etc. |
153 typedef std::map<syncable::ModelType, syncable::ModelTypeSet> PrefGroupsMap; | 161 typedef std::map<syncable::ModelType, syncable::ModelTypeSet> PrefGroupsMap; |
154 PrefGroupsMap pref_groups_; | 162 PrefGroupsMap pref_groups_; |
155 | 163 |
156 DISALLOW_COPY_AND_ASSIGN(SyncPrefs); | 164 DISALLOW_COPY_AND_ASSIGN(SyncPrefs); |
157 }; | 165 }; |
158 | 166 |
159 } // namespace browser_sync | 167 } // namespace browser_sync |
160 | 168 |
161 #endif // CHROME_BROWSER_SYNC_SYNC_PREFS_H_ | 169 #endif // CHROME_BROWSER_SYNC_SYNC_PREFS_H_ |
OLD | NEW |