OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef SYNC_INTERNAL_API_SYNC_BACKUP_MANAGER_H_ | |
6 #define SYNC_INTERNAL_API_SYNC_BACKUP_MANAGER_H_ | |
7 | |
8 #include <set> | |
9 | |
10 #include "sync/internal_api/sync_rollback_manager_base.h" | |
11 | |
12 namespace syncer { | |
13 | |
14 // SyncBackupManager runs before user signs in to sync to back up user's data | |
15 // before sync starts. The data that's backed up can be used to restore user's | |
16 // settings to pre-sync state. | |
17 class SyncBackupManager : public SyncRollbackManagerBase { | |
Nicolas Zea
2014/04/17 18:22:56
do these new classes need SYNC_EXPORT?
haitaol1
2014/04/17 19:30:38
They are not used by chrome/browser/sync. Looks li
| |
18 public: | |
19 SyncBackupManager(); | |
20 virtual ~SyncBackupManager(); | |
21 | |
22 // SyncManager implementation. | |
23 virtual void SaveChanges() OVERRIDE; | |
24 | |
25 // DirectoryChangeDelegate implementation. | |
26 virtual ModelTypeSet HandleTransactionEndingChangeEvent( | |
27 const syncable::ImmutableWriteTransactionInfo& write_transaction_info, | |
28 syncable::BaseTransaction* trans) OVERRIDE; | |
29 | |
30 private: | |
31 // Replaces local IDs with server IDs and clear unsynced bit of modified | |
32 // entries. | |
33 void NormalizeEntries(); | |
34 | |
35 // Handles of unsynced entries caused by local model changes. | |
36 std::set<int64> unsynced_; | |
37 | |
38 // True if NormalizeEntries() is being called. | |
39 bool in_normalization_; | |
Nicolas Zea
2014/04/17 18:22:56
DISALLOW_COPY_AND_ASSIGN (here and in the other cl
haitaol1
2014/04/17 19:30:38
Done.
| |
40 }; | |
41 | |
42 } // namespace syncer | |
43 | |
44 #endif // SYNC_INTERNAL_API_SYNC_BACKUP_MANAGER_H_ | |
OLD | NEW |