OLD | NEW |
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 #include "components/sync/driver/glue/sync_backend_host_mock.h" | 5 #include "components/sync/driver/glue/sync_backend_host_mock.h" |
6 | 6 |
7 #include "components/sync/driver/sync_frontend.h" | 7 #include "components/sync/driver/sync_frontend.h" |
8 #include "components/sync/engine/activation_context.h" | 8 #include "components/sync/engine/activation_context.h" |
9 | 9 |
10 namespace syncer { | 10 namespace syncer { |
11 | 11 |
12 const char kTestCacheGuid[] = "test-guid"; | 12 const char kTestCacheGuid[] = "test-guid"; |
13 | 13 |
14 SyncBackendHostMock::SyncBackendHostMock() : fail_initial_download_(false) {} | 14 SyncBackendHostMock::SyncBackendHostMock() : fail_initial_download_(false) {} |
15 SyncBackendHostMock::~SyncBackendHostMock() {} | 15 SyncBackendHostMock::~SyncBackendHostMock() {} |
16 | 16 |
17 void SyncBackendHostMock::Initialize( | 17 void SyncBackendHostMock::Initialize( |
18 SyncFrontend* frontend, | 18 SyncFrontend* frontend, |
19 std::unique_ptr<base::Thread> sync_thread, | 19 std::unique_ptr<base::Thread> sync_thread, |
20 const scoped_refptr<base::SingleThreadTaskRunner>& db_thread, | 20 const scoped_refptr<base::SingleThreadTaskRunner>& db_thread, |
21 const scoped_refptr<base::SingleThreadTaskRunner>& file_thread, | 21 const scoped_refptr<base::SingleThreadTaskRunner>& file_thread, |
22 const WeakHandle<JsEventHandler>& event_handler, | 22 const WeakHandle<JsEventHandler>& event_handler, |
23 const GURL& service_url, | 23 const GURL& service_url, |
24 const std::string& sync_user_agent, | 24 const std::string& sync_user_agent, |
25 const SyncCredentials& credentials, | 25 const SyncCredentials& credentials, |
26 bool delete_sync_data_folder, | 26 bool delete_sync_data_folder, |
27 bool enable_local_sync_backend, | |
28 const base::FilePath& local_sync_backend_folder, | |
29 std::unique_ptr<SyncManagerFactory> sync_manager_factory, | 27 std::unique_ptr<SyncManagerFactory> sync_manager_factory, |
30 const WeakHandle<UnrecoverableErrorHandler>& unrecoverable_error_handler, | 28 const WeakHandle<UnrecoverableErrorHandler>& unrecoverable_error_handler, |
31 const base::Closure& report_unrecoverable_error_function, | 29 const base::Closure& report_unrecoverable_error_function, |
32 const HttpPostProviderFactoryGetter& http_post_provider_factory_getter, | 30 const HttpPostProviderFactoryGetter& http_post_provider_factory_getter, |
33 std::unique_ptr<SyncEncryptionHandler::NigoriState> saved_nigori_state) { | 31 std::unique_ptr<SyncEncryptionHandler::NigoriState> saved_nigori_state) { |
34 frontend->OnBackendInitialized(WeakHandle<JsBackend>(), | 32 frontend->OnBackendInitialized(WeakHandle<JsBackend>(), |
35 WeakHandle<DataTypeDebugInfoListener>(), | 33 WeakHandle<DataTypeDebugInfoListener>(), |
36 kTestCacheGuid, !fail_initial_download_); | 34 kTestCacheGuid, !fail_initial_download_); |
37 } | 35 } |
38 | 36 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 | 138 |
141 void SyncBackendHostMock::ClearServerData( | 139 void SyncBackendHostMock::ClearServerData( |
142 const SyncManager::ClearServerDataCallback& callback) { | 140 const SyncManager::ClearServerDataCallback& callback) { |
143 callback.Run(); | 141 callback.Run(); |
144 } | 142 } |
145 | 143 |
146 void SyncBackendHostMock::OnCookieJarChanged(bool account_mismatch, | 144 void SyncBackendHostMock::OnCookieJarChanged(bool account_mismatch, |
147 bool empty_jar) {} | 145 bool empty_jar) {} |
148 | 146 |
149 } // namespace syncer | 147 } // namespace syncer |
OLD | NEW |