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 <stdint.h> |
| 9 |
8 #include <map> | 10 #include <map> |
9 #include <string> | 11 #include <string> |
10 | 12 |
11 #include "base/basictypes.h" | |
12 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/macros.h" |
13 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
14 #include "base/observer_list.h" | 16 #include "base/observer_list.h" |
15 #include "base/prefs/pref_member.h" | 17 #include "base/prefs/pref_member.h" |
16 #include "base/threading/non_thread_safe.h" | 18 #include "base/threading/non_thread_safe.h" |
17 #include "base/time/time.h" | 19 #include "base/time/time.h" |
| 20 #include "build/build_config.h" |
18 #include "sync/internal_api/public/base/model_type.h" | 21 #include "sync/internal_api/public/base/model_type.h" |
19 #include "sync/internal_api/public/sync_encryption_handler.h" | 22 #include "sync/internal_api/public/sync_encryption_handler.h" |
20 | 23 |
21 class PrefService; | 24 class PrefService; |
22 class ProfileIOData; | 25 class ProfileIOData; |
23 | 26 |
24 namespace user_prefs { | 27 namespace user_prefs { |
25 class PrefRegistrySyncable; | 28 class PrefRegistrySyncable; |
26 } | 29 } |
27 | 30 |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 void SetMemoryPressureWarningCount(int value); | 155 void SetMemoryPressureWarningCount(int value); |
153 | 156 |
154 // Check if the previous shutdown was clean. | 157 // Check if the previous shutdown was clean. |
155 bool DidSyncShutdownCleanly() const; | 158 bool DidSyncShutdownCleanly() const; |
156 | 159 |
157 // Set whether the last shutdown was clean. | 160 // Set whether the last shutdown was clean. |
158 void SetCleanShutdown(bool value); | 161 void SetCleanShutdown(bool value); |
159 | 162 |
160 // Get/set for the last known sync invalidation versions. | 163 // Get/set for the last known sync invalidation versions. |
161 void GetInvalidationVersions( | 164 void GetInvalidationVersions( |
162 std::map<syncer::ModelType, int64>* invalidation_versions) const; | 165 std::map<syncer::ModelType, int64_t>* invalidation_versions) const; |
163 void UpdateInvalidationVersions( | 166 void UpdateInvalidationVersions( |
164 const std::map<syncer::ModelType, int64>& invalidation_versions); | 167 const std::map<syncer::ModelType, int64_t>& invalidation_versions); |
165 | 168 |
166 // Will return the contents of the LastRunVersion preference. This may be an | 169 // Will return the contents of the LastRunVersion preference. This may be an |
167 // empty string if no version info was present, and is only valid at | 170 // empty string if no version info was present, and is only valid at |
168 // Sync startup time (after which the LastRunVersion preference will have been | 171 // Sync startup time (after which the LastRunVersion preference will have been |
169 // updated to the current version). | 172 // updated to the current version). |
170 std::string GetLastRunVersion() const; | 173 std::string GetLastRunVersion() const; |
171 void SetLastRunVersion(const std::string& current_version); | 174 void SetLastRunVersion(const std::string& current_version); |
172 | 175 |
173 // Get/set for flag indicating that passphrase encryption transition is in | 176 // Get/set for flag indicating that passphrase encryption transition is in |
174 // progress. | 177 // progress. |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 // etc. | 220 // etc. |
218 typedef std::map<syncer::ModelType, syncer::ModelTypeSet> PrefGroupsMap; | 221 typedef std::map<syncer::ModelType, syncer::ModelTypeSet> PrefGroupsMap; |
219 PrefGroupsMap pref_groups_; | 222 PrefGroupsMap pref_groups_; |
220 | 223 |
221 DISALLOW_COPY_AND_ASSIGN(SyncPrefs); | 224 DISALLOW_COPY_AND_ASSIGN(SyncPrefs); |
222 }; | 225 }; |
223 | 226 |
224 } // namespace sync_driver | 227 } // namespace sync_driver |
225 | 228 |
226 #endif // COMPONENTS_SYNC_DRIVER_SYNC_PREFS_H_ | 229 #endif // COMPONENTS_SYNC_DRIVER_SYNC_PREFS_H_ |
OLD | NEW |