Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / sync / internal_api / sync_rollback_manager.h
blobce40b7296397b2305fef3ab171b4b5eeb526e00f
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_
8 #include <string>
9 #include <vector>
11 #include "sync/internal_api/sync_rollback_manager_base.h"
13 class GURL;
15 namespace syncer {
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 {
20 public:
21 SyncRollbackManager();
22 virtual ~SyncRollbackManager();
24 // SyncManager implementation.
25 virtual void Init(InitArgs* args) OVERRIDE;
26 virtual void StartSyncingNormally(
27 const ModelSafeRoutingInfo& routing_info) OVERRIDE;
29 private:
30 // Deletes specified entries in local model.
31 SyncerError DeleteOnWorkerThread(ModelType type, std::vector<int64> handles);
33 void NotifyRollbackDone();
35 std::map<ModelSafeGroup, scoped_refptr<ModelSafeWorker> > workers_;
37 SyncManager::ChangeDelegate* change_delegate_;
39 // Types that can be rolled back.
40 ModelTypeSet rollback_ready_types_;
42 DISALLOW_COPY_AND_ASSIGN(SyncRollbackManager);
45 } // namespace syncer
47 #endif // SYNC_INTERNAL_API_SYNC_ROLLBACK_MANAGER_H_