Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1494)

Side by Side Diff: sync/internal_api/sync_rollback_manager.h

Issue 451743002: Pass args to SyncManager::Init via a struct. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use scoped_ptr instead of raw pointer. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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_ROLLBACK_MANAGER_H_ 5 #ifndef SYNC_INTERNAL_API_SYNC_ROLLBACK_MANAGER_H_
6 #define SYNC_INTERNAL_API_SYNC_ROLLBACK_MANAGER_H_ 6 #define SYNC_INTERNAL_API_SYNC_ROLLBACK_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "sync/internal_api/sync_rollback_manager_base.h" 11 #include "sync/internal_api/sync_rollback_manager_base.h"
12 12
13 class GURL; 13 class GURL;
14 14
15 namespace syncer { 15 namespace syncer {
16 16
17 // SyncRollbackManager restores user's data to pre-sync state using backup 17 // SyncRollbackManager restores user's data to pre-sync state using backup
18 // DB created by SyncBackupManager. 18 // DB created by SyncBackupManager.
19 class SYNC_EXPORT_PRIVATE SyncRollbackManager : public SyncRollbackManagerBase { 19 class SYNC_EXPORT_PRIVATE SyncRollbackManager : public SyncRollbackManagerBase {
20 public: 20 public:
21 SyncRollbackManager(); 21 SyncRollbackManager();
22 virtual ~SyncRollbackManager(); 22 virtual ~SyncRollbackManager();
23 23
24 // SyncManager implementation. 24 // SyncManager implementation.
25 virtual void Init( 25 virtual void Init(InitArgs* args) OVERRIDE;
26 const base::FilePath& database_location,
27 const WeakHandle<JsEventHandler>& event_handler,
28 const GURL& service_url,
29 scoped_ptr<HttpPostProviderFactory> post_factory,
30 const std::vector<scoped_refptr<ModelSafeWorker> >& workers,
31 ExtensionsActivity* extensions_activity,
32 SyncManager::ChangeDelegate* change_delegate,
33 const SyncCredentials& credentials,
34 const std::string& invalidator_client_id,
35 const std::string& restored_key_for_bootstrapping,
36 const std::string& restored_keystore_key_for_bootstrapping,
37 InternalComponentsFactory* internal_components_factory,
38 Encryptor* encryptor,
39 scoped_ptr<UnrecoverableErrorHandler> unrecoverable_error_handler,
40 ReportUnrecoverableErrorFunction report_unrecoverable_error_function,
41 CancelationSignal* cancelation_signal) OVERRIDE;
42 virtual void StartSyncingNormally( 26 virtual void StartSyncingNormally(
43 const ModelSafeRoutingInfo& routing_info) OVERRIDE; 27 const ModelSafeRoutingInfo& routing_info) OVERRIDE;
44 28
45 private: 29 private:
46 // Deletes specified entries in local model. 30 // Deletes specified entries in local model.
47 SyncerError DeleteOnWorkerThread(ModelType type, std::vector<int64> handles); 31 SyncerError DeleteOnWorkerThread(ModelType type, std::vector<int64> handles);
48 32
49 void NotifyRollbackDone(); 33 void NotifyRollbackDone();
50 34
51 std::map<ModelSafeGroup, scoped_refptr<ModelSafeWorker> > workers_; 35 std::map<ModelSafeGroup, scoped_refptr<ModelSafeWorker> > workers_;
52 36
53 SyncManager::ChangeDelegate* change_delegate_; 37 SyncManager::ChangeDelegate* change_delegate_;
54 38
55 // Types that can be rolled back. 39 // Types that can be rolled back.
56 ModelTypeSet rollback_ready_types_; 40 ModelTypeSet rollback_ready_types_;
57 41
58 DISALLOW_COPY_AND_ASSIGN(SyncRollbackManager); 42 DISALLOW_COPY_AND_ASSIGN(SyncRollbackManager);
59 }; 43 };
60 44
61 } // namespace syncer 45 } // namespace syncer
62 46
63 #endif // SYNC_INTERNAL_API_SYNC_ROLLBACK_MANAGER_H_ 47 #endif // SYNC_INTERNAL_API_SYNC_ROLLBACK_MANAGER_H_
OLDNEW
« no previous file with comments | « sync/internal_api/sync_manager_impl_unittest.cc ('k') | sync/internal_api/sync_rollback_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698