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.
5 #ifndef SYNC_INTERNAL_API_SYNC_ROLLBACK_MANAGER_H_
6 #define SYNC_INTERNAL_API_SYNC_ROLLBACK_MANAGER_H_
11 #include "sync/internal_api/sync_rollback_manager_base.h"
17 // SyncRollbackManager restores user's data to pre-sync state using backup
18 // DB created by SyncBackupManager.
19 class SYNC_EXPORT_PRIVATE SyncRollbackManager
: public SyncRollbackManagerBase
{
21 SyncRollbackManager();
22 ~SyncRollbackManager() override
;
24 // SyncManager implementation.
25 void Init(InitArgs
* args
) override
;
26 void StartSyncingNormally(const ModelSafeRoutingInfo
& routing_info
) override
;
29 // Deletes specified entries in local model.
30 SyncerError
DeleteOnWorkerThread(ModelType type
, std::vector
<int64
> handles
);
32 void NotifyRollbackDone();
34 std::map
<ModelSafeGroup
, scoped_refptr
<ModelSafeWorker
> > workers_
;
36 SyncManager::ChangeDelegate
* change_delegate_
;
38 // Types that can be rolled back.
39 ModelTypeSet rollback_ready_types_
;
41 DISALLOW_COPY_AND_ASSIGN(SyncRollbackManager
);
46 #endif // SYNC_INTERNAL_API_SYNC_ROLLBACK_MANAGER_H_