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 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // Changes are still made to the prefs even if | 87 // Changes are still made to the prefs even if |
88 // HasKeepEverythingSynced() is true, but won't be visible until | 88 // HasKeepEverythingSynced() is true, but won't be visible until |
89 // SetKeepEverythingSynced(false) is called. | 89 // SetKeepEverythingSynced(false) is called. |
90 void SetPreferredDataTypes( | 90 void SetPreferredDataTypes( |
91 syncer::ModelTypeSet registered_types, | 91 syncer::ModelTypeSet registered_types, |
92 syncer::ModelTypeSet preferred_types); | 92 syncer::ModelTypeSet preferred_types); |
93 | 93 |
94 // This pref is set outside of sync. | 94 // This pref is set outside of sync. |
95 bool IsManaged() const; | 95 bool IsManaged() const; |
96 | 96 |
97 // Use this encryption bootstrap token once already syncing. | 97 // Use this encryption bootstrap token if we're using an explicit passphrase. |
98 std::string GetEncryptionBootstrapToken() const; | 98 std::string GetEncryptionBootstrapToken() const; |
99 void SetEncryptionBootstrapToken(const std::string& token); | 99 void SetEncryptionBootstrapToken(const std::string& token); |
100 | 100 |
| 101 // Use this keystore bootstrap token if we're not using an explicit |
| 102 // passphrase. |
| 103 std::string GetKeystoreEncryptionBootstrapToken() const; |
| 104 void SetKeystoreEncryptionBootstrapToken(const std::string& token); |
| 105 |
101 // Maps |data_type| to its corresponding preference name. | 106 // Maps |data_type| to its corresponding preference name. |
102 static const char* GetPrefNameForDataType(syncer::ModelType data_type); | 107 static const char* GetPrefNameForDataType(syncer::ModelType data_type); |
103 | 108 |
104 #if defined(OS_CHROMEOS) | 109 #if defined(OS_CHROMEOS) |
105 // Use this spare bootstrap token only when setting up sync for the first | 110 // Use this spare bootstrap token only when setting up sync for the first |
106 // time. | 111 // time. |
107 std::string GetSpareBootstrapToken() const; | 112 std::string GetSpareBootstrapToken() const; |
108 void SetSpareBootstrapToken(const std::string& token); | 113 void SetSpareBootstrapToken(const std::string& token); |
109 #endif | 114 #endif |
110 | 115 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 // etc. | 159 // etc. |
155 typedef std::map<syncer::ModelType, syncer::ModelTypeSet> PrefGroupsMap; | 160 typedef std::map<syncer::ModelType, syncer::ModelTypeSet> PrefGroupsMap; |
156 PrefGroupsMap pref_groups_; | 161 PrefGroupsMap pref_groups_; |
157 | 162 |
158 DISALLOW_COPY_AND_ASSIGN(SyncPrefs); | 163 DISALLOW_COPY_AND_ASSIGN(SyncPrefs); |
159 }; | 164 }; |
160 | 165 |
161 } // namespace browser_sync | 166 } // namespace browser_sync |
162 | 167 |
163 #endif // CHROME_BROWSER_SYNC_SYNC_PREFS_H_ | 168 #endif // CHROME_BROWSER_SYNC_SYNC_PREFS_H_ |
OLD | NEW |