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

Side by Side Diff: components/sync/engine/fake_sync_engine.h

Issue 2533083002: [Sync] SyncEngine refactor part 1: interfaces. (Closed)
Patch Set: Rebase. Created 4 years 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
« no previous file with comments | « components/sync/driver/sync_service.h ('k') | components/sync/engine/fake_sync_engine.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_MOCK_H_ 5 #ifndef COMPONENTS_SYNC_ENGINE_FAKE_SYNC_ENGINE_H_
6 #define COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_MOCK_H_ 6 #define COMPONENTS_SYNC_ENGINE_FAKE_SYNC_ENGINE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "components/sync/base/weak_handle.h" 13 #include "components/sync/base/weak_handle.h"
14 #include "components/sync/driver/glue/sync_backend_host.h" 14 #include "components/sync/engine/sync_engine.h"
15 15
16 namespace syncer { 16 namespace syncer {
17 17
18 // A mock of the SyncBackendHost. 18 // A mock of the SyncEngine.
19 // 19 //
20 // This class implements the bare minimum required for the ProfileSyncService to 20 // This class implements the bare minimum required for the ProfileSyncService to
21 // get through initialization. It often returns null pointers or nonesense 21 // get through initialization. It often returns null pointers or nonesense
22 // values; it is not intended to be used in tests that depend on SyncBackendHost 22 // values; it is not intended to be used in tests that depend on SyncEngine
23 // behavior. 23 // behavior.
24 class SyncBackendHostMock : public SyncBackendHost { 24 class FakeSyncEngine : public SyncEngine {
25 public: 25 public:
26 SyncBackendHostMock(); 26 FakeSyncEngine();
27 ~SyncBackendHostMock() override; 27 ~FakeSyncEngine() override;
28 28
29 void Initialize( 29 void Initialize(
30 SyncFrontend* frontend, 30 SyncEngineHost* host,
31 scoped_refptr<base::SingleThreadTaskRunner> sync_task_runner, 31 scoped_refptr<base::SingleThreadTaskRunner> sync_task_runner,
32 const WeakHandle<JsEventHandler>& event_handler, 32 const WeakHandle<JsEventHandler>& event_handler,
33 const GURL& service_url, 33 const GURL& service_url,
34 const std::string& sync_user_agent, 34 const std::string& sync_user_agent,
35 const SyncCredentials& credentials, 35 const SyncCredentials& credentials,
36 bool delete_sync_data_folder, 36 bool delete_sync_data_folder,
37 bool enable_local_sync_backend, 37 bool enable_local_sync_backend,
38 const base::FilePath& local_sync_backend_folder, 38 const base::FilePath& local_sync_backend_folder,
39 std::unique_ptr<SyncManagerFactory> sync_manager_factory, 39 std::unique_ptr<SyncManagerFactory> sync_manager_factory,
40 const WeakHandle<UnrecoverableErrorHandler>& unrecoverable_error_handler, 40 const WeakHandle<UnrecoverableErrorHandler>& unrecoverable_error_handler,
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 void OnCookieJarChanged(bool account_mismatch, bool empty_jar) override; 111 void OnCookieJarChanged(bool account_mismatch, bool empty_jar) override;
112 112
113 void set_fail_initial_download(bool should_fail); 113 void set_fail_initial_download(bool should_fail);
114 114
115 private: 115 private:
116 bool fail_initial_download_; 116 bool fail_initial_download_;
117 }; 117 };
118 118
119 } // namespace syncer 119 } // namespace syncer
120 120
121 #endif // COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_MOCK_H_ 121 #endif // COMPONENTS_SYNC_ENGINE_FAKE_SYNC_ENGINE_H_
OLDNEW
« no previous file with comments | « components/sync/driver/sync_service.h ('k') | components/sync/engine/fake_sync_engine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698