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 "chrome/browser/sync/glue/sync_backend_host_mock.h" | 5 #include "chrome/browser/sync/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 | 8 |
9 namespace browser_sync { | 9 namespace browser_sync { |
10 | 10 |
11 const char kTestCacheGuid[] = "test-guid"; | 11 const char kTestCacheGuid[] = "test-guid"; |
12 | 12 |
13 SyncBackendHostMock::SyncBackendHostMock() : fail_initial_download_(false) {} | 13 SyncBackendHostMock::SyncBackendHostMock() : fail_initial_download_(false) {} |
14 SyncBackendHostMock::~SyncBackendHostMock() {} | 14 SyncBackendHostMock::~SyncBackendHostMock() {} |
15 | 15 |
16 void SyncBackendHostMock::Initialize( | 16 void SyncBackendHostMock::Initialize( |
17 sync_driver::SyncFrontend* frontend, | 17 sync_driver::SyncFrontend* frontend, |
18 scoped_ptr<base::Thread> sync_thread, | 18 scoped_ptr<base::Thread> sync_thread, |
19 const syncer::WeakHandle<syncer::JsEventHandler>& event_handler, | 19 const syncer::WeakHandle<syncer::JsEventHandler>& event_handler, |
20 const GURL& service_url, | 20 const GURL& service_url, |
21 const syncer::SyncCredentials& credentials, | 21 const syncer::SyncCredentials& credentials, |
22 bool delete_sync_data_folder, | 22 bool delete_sync_data_folder, |
23 scoped_ptr<syncer::SyncManagerFactory> sync_manager_factory, | 23 scoped_ptr<syncer::SyncManagerFactory> sync_manager_factory, |
24 scoped_ptr<syncer::UnrecoverableErrorHandler> unrecoverable_error_handler, | 24 const syncer::WeakHandle<syncer::UnrecoverableErrorHandler>& |
| 25 unrecoverable_error_handler, |
25 const base::Closure& report_unrecoverable_error_function, | 26 const base::Closure& report_unrecoverable_error_function, |
26 syncer::NetworkResources* network_resources, | 27 syncer::NetworkResources* network_resources, |
27 scoped_ptr<syncer::SyncEncryptionHandler::NigoriState> saved_nigori_state) { | 28 scoped_ptr<syncer::SyncEncryptionHandler::NigoriState> saved_nigori_state) { |
28 frontend->OnBackendInitialized( | 29 frontend->OnBackendInitialized( |
29 syncer::WeakHandle<syncer::JsBackend>(), | 30 syncer::WeakHandle<syncer::JsBackend>(), |
30 syncer::WeakHandle<syncer::DataTypeDebugInfoListener>(), | 31 syncer::WeakHandle<syncer::DataTypeDebugInfoListener>(), |
31 kTestCacheGuid, | 32 kTestCacheGuid, |
32 !fail_initial_download_); | 33 !fail_initial_download_); |
33 } | 34 } |
34 | 35 |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 void SyncBackendHostMock::set_fail_initial_download(bool should_fail) { | 138 void SyncBackendHostMock::set_fail_initial_download(bool should_fail) { |
138 fail_initial_download_ = should_fail; | 139 fail_initial_download_ = should_fail; |
139 } | 140 } |
140 | 141 |
141 void SyncBackendHostMock::ClearServerData( | 142 void SyncBackendHostMock::ClearServerData( |
142 const syncer::SyncManager::ClearServerDataCallback& callback) { | 143 const syncer::SyncManager::ClearServerDataCallback& callback) { |
143 NOTIMPLEMENTED(); | 144 NOTIMPLEMENTED(); |
144 } | 145 } |
145 | 146 |
146 } // namespace browser_sync | 147 } // namespace browser_sync |
OLD | NEW |