| 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_impl.h" | 5 #include "components/sync/driver/glue/sync_backend_host_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 bool enable_local_sync_backend, | 81 bool enable_local_sync_backend, |
| 82 const base::FilePath& local_sync_backend_folder, | 82 const base::FilePath& local_sync_backend_folder, |
| 83 std::unique_ptr<SyncManagerFactory> sync_manager_factory, | 83 std::unique_ptr<SyncManagerFactory> sync_manager_factory, |
| 84 const WeakHandle<UnrecoverableErrorHandler>& unrecoverable_error_handler, | 84 const WeakHandle<UnrecoverableErrorHandler>& unrecoverable_error_handler, |
| 85 const base::Closure& report_unrecoverable_error_function, | 85 const base::Closure& report_unrecoverable_error_function, |
| 86 const HttpPostProviderFactoryGetter& http_post_provider_factory_getter, | 86 const HttpPostProviderFactoryGetter& http_post_provider_factory_getter, |
| 87 std::unique_ptr<SyncEncryptionHandler::NigoriState> saved_nigori_state) { | 87 std::unique_ptr<SyncEncryptionHandler::NigoriState> saved_nigori_state) { |
| 88 CHECK(sync_thread); | 88 CHECK(sync_thread); |
| 89 sync_thread_ = sync_thread; | 89 sync_thread_ = sync_thread; |
| 90 | 90 |
| 91 registrar_ = base::MakeUnique<SyncBackendRegistrar>(name_, sync_client_); | 91 registrar_ = base::MakeUnique<SyncBackendRegistrar>( |
| 92 name_, base::Bind(&SyncClient::CreateModelWorkerForGroup, |
| 93 base::Unretained(sync_client_))); |
| 92 | 94 |
| 93 DCHECK(frontend); | 95 DCHECK(frontend); |
| 94 frontend_ = frontend; | 96 frontend_ = frontend; |
| 95 | 97 |
| 96 std::vector<scoped_refptr<ModelSafeWorker>> workers; | 98 std::vector<scoped_refptr<ModelSafeWorker>> workers; |
| 97 registrar_->GetWorkers(&workers); | 99 registrar_->GetWorkers(&workers); |
| 98 | 100 |
| 99 EngineComponentsFactory::Switches factory_switches = { | 101 EngineComponentsFactory::Switches factory_switches = { |
| 100 EngineComponentsFactory::ENCRYPTION_KEYSTORE, | 102 EngineComponentsFactory::ENCRYPTION_KEYSTORE, |
| 101 EngineComponentsFactory::BACKOFF_NORMAL}; | 103 EngineComponentsFactory::BACKOFF_NORMAL}; |
| (...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 805 const SyncManager::ClearServerDataCallback& frontend_callback) { | 807 const SyncManager::ClearServerDataCallback& frontend_callback) { |
| 806 DCHECK(ui_thread_->BelongsToCurrentThread()); | 808 DCHECK(ui_thread_->BelongsToCurrentThread()); |
| 807 frontend_callback.Run(); | 809 frontend_callback.Run(); |
| 808 } | 810 } |
| 809 | 811 |
| 810 } // namespace syncer | 812 } // namespace syncer |
| 811 | 813 |
| 812 #undef SDVLOG | 814 #undef SDVLOG |
| 813 | 815 |
| 814 #undef SLOG | 816 #undef SLOG |
| OLD | NEW |