| 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 COMPONENTS_SYNC_DRIVER_SYNC_PREFS_H_ | 5 #ifndef COMPONENTS_SYNC_DRIVER_SYNC_PREFS_H_ |
| 6 #define COMPONENTS_SYNC_DRIVER_SYNC_PREFS_H_ | 6 #define COMPONENTS_SYNC_DRIVER_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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 void SetFirstSyncTime(base::Time time); | 133 void SetFirstSyncTime(base::Time time); |
| 134 void ClearFirstSyncTime(); | 134 void ClearFirstSyncTime(); |
| 135 | 135 |
| 136 // Out of band sync passphrase prompt getter/setter. | 136 // Out of band sync passphrase prompt getter/setter. |
| 137 bool IsPassphrasePrompted() const; | 137 bool IsPassphrasePrompted() const; |
| 138 void SetPassphrasePrompted(bool value); | 138 void SetPassphrasePrompted(bool value); |
| 139 | 139 |
| 140 // For testing. | 140 // For testing. |
| 141 void SetManagedForTest(bool is_managed); | 141 void SetManagedForTest(bool is_managed); |
| 142 | 142 |
| 143 int GetMemoryPressure() const; |
| 144 void SetMemoryPressure(int value); |
| 145 bool IsPreviousCrashed() const; |
| 146 void SetCurrentShutdown(bool value); |
| 147 |
| 143 private: | 148 private: |
| 144 void RegisterPrefGroups(); | 149 void RegisterPrefGroups(); |
| 145 | 150 |
| 146 static void RegisterDataTypePreferredPref( | 151 static void RegisterDataTypePreferredPref( |
| 147 user_prefs::PrefRegistrySyncable* prefs, | 152 user_prefs::PrefRegistrySyncable* prefs, |
| 148 syncer::ModelType type, | 153 syncer::ModelType type, |
| 149 bool is_preferred); | 154 bool is_preferred); |
| 150 bool GetDataTypePreferred(syncer::ModelType type) const; | 155 bool GetDataTypePreferred(syncer::ModelType type) const; |
| 151 void SetDataTypePreferred(syncer::ModelType type, bool is_preferred); | 156 void SetDataTypePreferred(syncer::ModelType type, bool is_preferred); |
| 152 | 157 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 175 // etc. | 180 // etc. |
| 176 typedef std::map<syncer::ModelType, syncer::ModelTypeSet> PrefGroupsMap; | 181 typedef std::map<syncer::ModelType, syncer::ModelTypeSet> PrefGroupsMap; |
| 177 PrefGroupsMap pref_groups_; | 182 PrefGroupsMap pref_groups_; |
| 178 | 183 |
| 179 DISALLOW_COPY_AND_ASSIGN(SyncPrefs); | 184 DISALLOW_COPY_AND_ASSIGN(SyncPrefs); |
| 180 }; | 185 }; |
| 181 | 186 |
| 182 } // namespace sync_driver | 187 } // namespace sync_driver |
| 183 | 188 |
| 184 #endif // COMPONENTS_SYNC_DRIVER_SYNC_PREFS_H_ | 189 #endif // COMPONENTS_SYNC_DRIVER_SYNC_PREFS_H_ |
| OLD | NEW |