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 SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 5 #ifndef SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
6 #define SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 6 #define SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 // Called only by our NetworkChangeNotifier. | 187 // Called only by our NetworkChangeNotifier. |
188 virtual void OnIPAddressChanged() OVERRIDE; | 188 virtual void OnIPAddressChanged() OVERRIDE; |
189 | 189 |
190 const SyncScheduler* scheduler() const; | 190 const SyncScheduler* scheduler() const; |
191 | 191 |
192 private: | 192 private: |
193 friend class SyncManagerTest; | 193 friend class SyncManagerTest; |
194 FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, NudgeDelayTest); | 194 FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, NudgeDelayTest); |
195 FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, OnNotificationStateChange); | 195 FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, OnNotificationStateChange); |
196 FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, OnIncomingNotification); | 196 FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, OnIncomingNotification); |
| 197 FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, PurgeDisabledTypes); |
197 | 198 |
198 struct NotificationInfo { | 199 struct NotificationInfo { |
199 NotificationInfo(); | 200 NotificationInfo(); |
200 ~NotificationInfo(); | 201 ~NotificationInfo(); |
201 | 202 |
202 int total_count; | 203 int total_count; |
203 std::string payload; | 204 std::string payload; |
204 | 205 |
205 // Returned pointer owned by the caller. | 206 // Returned pointer owned by the caller. |
206 DictionaryValue* ToValue() const; | 207 DictionaryValue* ToValue() const; |
(...skipping 27 matching lines...) Expand all Loading... |
234 | 235 |
235 // Open the directory named with username_for_share | 236 // Open the directory named with username_for_share |
236 bool OpenDirectory(); | 237 bool OpenDirectory(); |
237 | 238 |
238 // Sign into sync with given credentials. | 239 // Sign into sync with given credentials. |
239 // We do not verify the tokens given. After this call, the tokens are set | 240 // We do not verify the tokens given. After this call, the tokens are set |
240 // and the sync DB is open. True if successful, false if something | 241 // and the sync DB is open. True if successful, false if something |
241 // went wrong. | 242 // went wrong. |
242 bool SignIn(const SyncCredentials& credentials); | 243 bool SignIn(const SyncCredentials& credentials); |
243 | 244 |
| 245 // Purge those types from |previously_enabled_types| that are no longer |
| 246 // enabled in |currently_enabled_types|. |
| 247 bool PurgeDisabledTypes(ModelTypeSet previously_enabled_types, |
| 248 ModelTypeSet currently_enabled_types); |
| 249 |
244 void RequestNudgeForDataTypes( | 250 void RequestNudgeForDataTypes( |
245 const tracked_objects::Location& nudge_location, | 251 const tracked_objects::Location& nudge_location, |
246 ModelTypeSet type); | 252 ModelTypeSet type); |
247 | 253 |
248 void NotifyCryptographerState(Cryptographer* cryptographer); | 254 void NotifyCryptographerState(Cryptographer* cryptographer); |
249 | 255 |
250 // If this is a deletion for a password, sets the legacy | 256 // If this is a deletion for a password, sets the legacy |
251 // ExtraPasswordChangeRecordData field of |buffer|. Otherwise sets | 257 // ExtraPasswordChangeRecordData field of |buffer|. Otherwise sets |
252 // |buffer|'s specifics field to contain the unencrypted data. | 258 // |buffer|'s specifics field to contain the unencrypted data. |
253 void SetExtraChangeRecordData(int64 id, | 259 void SetExtraChangeRecordData(int64 id, |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 // conflict resolver) updated the nigori's encryption keys in this chrome | 421 // conflict resolver) updated the nigori's encryption keys in this chrome |
416 // instantiation. | 422 // instantiation. |
417 int nigori_overwrite_count_; | 423 int nigori_overwrite_count_; |
418 | 424 |
419 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); | 425 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); |
420 }; | 426 }; |
421 | 427 |
422 } // namespace syncer | 428 } // namespace syncer |
423 | 429 |
424 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 430 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
OLD | NEW |