| 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 "chrome/browser/sync/glue/sync_frontend.h" | 7 #include "chrome/browser/sync/glue/sync_frontend.h" |
| 8 | 8 |
| 9 namespace browser_sync { | 9 namespace browser_sync { |
| 10 | 10 |
| 11 SyncBackendHostMock::SyncBackendHostMock() : fail_initial_download_(false) {} | 11 SyncBackendHostMock::SyncBackendHostMock() : fail_initial_download_(false) {} |
| 12 SyncBackendHostMock::~SyncBackendHostMock() {} | 12 SyncBackendHostMock::~SyncBackendHostMock() {} |
| 13 | 13 |
| 14 void SyncBackendHostMock::Initialize( | 14 void SyncBackendHostMock::Initialize( |
| 15 SyncFrontend* frontend, | 15 SyncFrontend* frontend, |
| 16 scoped_ptr<base::Thread> sync_thread, | 16 scoped_ptr<base::Thread> sync_thread, |
| 17 const syncer::WeakHandle<syncer::JsEventHandler>& event_handler, | 17 const syncer::WeakHandle<syncer::JsEventHandler>& event_handler, |
| 18 const GURL& service_url, | 18 const GURL& service_url, |
| 19 const syncer::SyncCredentials& credentials, | 19 const syncer::SyncCredentials& credentials, |
| 20 bool delete_sync_data_folder, | 20 bool delete_sync_data_folder, |
| 21 scoped_ptr<syncer::SyncManagerFactory> sync_manager_factory, | 21 scoped_ptr<syncer::SyncManagerFactory> sync_manager_factory, |
| 22 scoped_ptr<syncer::UnrecoverableErrorHandler> unrecoverable_error_handler, | 22 scoped_ptr<syncer::UnrecoverableErrorHandler> unrecoverable_error_handler, |
| 23 syncer::ReportUnrecoverableErrorFunction | 23 syncer::ReportUnrecoverableErrorFunction |
| 24 report_unrecoverable_error_function) { | 24 report_unrecoverable_error_function, |
| 25 syncer::HttpPostProviderFactoryFactory* |
| 26 http_post_provider_factory_factory) { |
| 25 frontend->OnBackendInitialized( | 27 frontend->OnBackendInitialized( |
| 26 syncer::WeakHandle<syncer::JsBackend>(), | 28 syncer::WeakHandle<syncer::JsBackend>(), |
| 27 syncer::WeakHandle<syncer::DataTypeDebugInfoListener>(), | 29 syncer::WeakHandle<syncer::DataTypeDebugInfoListener>(), |
| 28 !fail_initial_download_); | 30 !fail_initial_download_); |
| 29 } | 31 } |
| 30 | 32 |
| 31 void SyncBackendHostMock::UpdateCredentials( | 33 void SyncBackendHostMock::UpdateCredentials( |
| 32 const syncer::SyncCredentials& credentials) {} | 34 const syncer::SyncCredentials& credentials) {} |
| 33 | 35 |
| 34 void SyncBackendHostMock::StartSyncingWithServer() {} | 36 void SyncBackendHostMock::StartSyncingWithServer() {} |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 base::MessageLoop* SyncBackendHostMock::GetSyncLoopForTesting() { | 110 base::MessageLoop* SyncBackendHostMock::GetSyncLoopForTesting() { |
| 109 return NULL; | 111 return NULL; |
| 110 } | 112 } |
| 111 | 113 |
| 112 void SyncBackendHostMock::set_fail_initial_download(bool should_fail) { | 114 void SyncBackendHostMock::set_fail_initial_download(bool should_fail) { |
| 113 fail_initial_download_ = should_fail; | 115 fail_initial_download_ = should_fail; |
| 114 } | 116 } |
| 115 | 117 |
| 116 } // namespace browser_sync | 118 } // namespace browser_sync |
| 117 | 119 |
| OLD | NEW |