| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 once already syncing. |
| 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 // Maps |data_type| to its corresponding preference name. |
| 102 static const char* GetPrefNameForDataType(syncer::ModelType data_type); |
| 103 |
| 101 #if defined(OS_CHROMEOS) | 104 #if defined(OS_CHROMEOS) |
| 102 // Use this spare bootstrap token only when setting up sync for the first | 105 // Use this spare bootstrap token only when setting up sync for the first |
| 103 // time. | 106 // time. |
| 104 std::string GetSpareBootstrapToken() const; | 107 std::string GetSpareBootstrapToken() const; |
| 105 void SetSpareBootstrapToken(const std::string& token); | 108 void SetSpareBootstrapToken(const std::string& token); |
| 106 #endif | 109 #endif |
| 107 | 110 |
| 108 // Merges the given set of types with the set of acknowledged types. | 111 // Merges the given set of types with the set of acknowledged types. |
| 109 void AcknowledgeSyncedTypes(syncer::ModelTypeSet types); | 112 void AcknowledgeSyncedTypes(syncer::ModelTypeSet types); |
| 110 | 113 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 // etc. | 154 // etc. |
| 152 typedef std::map<syncer::ModelType, syncer::ModelTypeSet> PrefGroupsMap; | 155 typedef std::map<syncer::ModelType, syncer::ModelTypeSet> PrefGroupsMap; |
| 153 PrefGroupsMap pref_groups_; | 156 PrefGroupsMap pref_groups_; |
| 154 | 157 |
| 155 DISALLOW_COPY_AND_ASSIGN(SyncPrefs); | 158 DISALLOW_COPY_AND_ASSIGN(SyncPrefs); |
| 156 }; | 159 }; |
| 157 | 160 |
| 158 } // namespace browser_sync | 161 } // namespace browser_sync |
| 159 | 162 |
| 160 #endif // CHROME_BROWSER_SYNC_SYNC_PREFS_H_ | 163 #endif // CHROME_BROWSER_SYNC_SYNC_PREFS_H_ |
| OLD | NEW |