blob: ce40b7296397b2305fef3ab171b4b5eeb526e00f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SYNC_INTERNAL_API_SYNC_ROLLBACK_MANAGER_H_
#define SYNC_INTERNAL_API_SYNC_ROLLBACK_MANAGER_H_
#include <string>
#include <vector>
#include "sync/internal_api/sync_rollback_manager_base.h"
class GURL;
namespace syncer {
// SyncRollbackManager restores user's data to pre-sync state using backup
// DB created by SyncBackupManager.
class SYNC_EXPORT_PRIVATE SyncRollbackManager : public SyncRollbackManagerBase {
public:
SyncRollbackManager();
virtual ~SyncRollbackManager();
// SyncManager implementation.
virtual void Init(InitArgs* args) OVERRIDE;
virtual void StartSyncingNormally(
const ModelSafeRoutingInfo& routing_info) OVERRIDE;
private:
// Deletes specified entries in local model.
SyncerError DeleteOnWorkerThread(ModelType type, std::vector<int64> handles);
void NotifyRollbackDone();
std::map<ModelSafeGroup, scoped_refptr<ModelSafeWorker> > workers_;
SyncManager::ChangeDelegate* change_delegate_;
// Types that can be rolled back.
ModelTypeSet rollback_ready_types_;
DISALLOW_COPY_AND_ASSIGN(SyncRollbackManager);
};
} // namespace syncer
#endif // SYNC_INTERNAL_API_SYNC_ROLLBACK_MANAGER_H_
|