Chromium Code Reviews| 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 // Get/Set number of memory warning received. | |
| 144 int GetMemoryPressureWarningCount() const; | |
| 145 void SetMemoryPressureWarningCount(int value); | |
| 146 | |
| 147 // Check if previous shutdown cleanly. | |
| 148 bool IsPreviousShutdownCleanly() const; | |
|
stanisc
2015/05/15 22:06:48
The function name could be a bit clearer.
Gang Wu
2015/05/15 22:22:30
Done.
| |
| 149 | |
| 150 // Set the sync service shutdown cleanly. | |
| 151 void SetCurrentShutdownCleanly(bool value); | |
| 152 | |
| 143 private: | 153 private: |
| 144 void RegisterPrefGroups(); | 154 void RegisterPrefGroups(); |
| 145 | 155 |
| 146 static void RegisterDataTypePreferredPref( | 156 static void RegisterDataTypePreferredPref( |
| 147 user_prefs::PrefRegistrySyncable* prefs, | 157 user_prefs::PrefRegistrySyncable* prefs, |
| 148 syncer::ModelType type, | 158 syncer::ModelType type, |
| 149 bool is_preferred); | 159 bool is_preferred); |
| 150 bool GetDataTypePreferred(syncer::ModelType type) const; | 160 bool GetDataTypePreferred(syncer::ModelType type) const; |
| 151 void SetDataTypePreferred(syncer::ModelType type, bool is_preferred); | 161 void SetDataTypePreferred(syncer::ModelType type, bool is_preferred); |
| 152 | 162 |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 175 // etc. | 185 // etc. |
| 176 typedef std::map<syncer::ModelType, syncer::ModelTypeSet> PrefGroupsMap; | 186 typedef std::map<syncer::ModelType, syncer::ModelTypeSet> PrefGroupsMap; |
| 177 PrefGroupsMap pref_groups_; | 187 PrefGroupsMap pref_groups_; |
| 178 | 188 |
| 179 DISALLOW_COPY_AND_ASSIGN(SyncPrefs); | 189 DISALLOW_COPY_AND_ASSIGN(SyncPrefs); |
| 180 }; | 190 }; |
| 181 | 191 |
| 182 } // namespace sync_driver | 192 } // namespace sync_driver |
| 183 | 193 |
| 184 #endif // COMPONENTS_SYNC_DRIVER_SYNC_PREFS_H_ | 194 #endif // COMPONENTS_SYNC_DRIVER_SYNC_PREFS_H_ |
| OLD | NEW |