| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_registrar.h" | 5 #include "components/sync/driver/glue/sync_backend_registrar.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cstddef> | 8 #include <cstddef> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/memory/ptr_util.h" | 12 #include "base/memory/ptr_util.h" |
| 13 #include "components/sync/driver/change_processor.h" | 13 #include "components/sync/model/change_processor.h" |
| 14 #include "components/sync/syncable/user_share.h" | 14 #include "components/sync/syncable/user_share.h" |
| 15 | 15 |
| 16 namespace syncer { | 16 namespace syncer { |
| 17 | 17 |
| 18 SyncBackendRegistrar::SyncBackendRegistrar( | 18 SyncBackendRegistrar::SyncBackendRegistrar( |
| 19 const std::string& name, | 19 const std::string& name, |
| 20 ModelSafeWorkerFactory worker_factory) | 20 ModelSafeWorkerFactory worker_factory) |
| 21 : name_(name) { | 21 : name_(name) { |
| 22 DCHECK(!worker_factory.is_null()); | 22 DCHECK(!worker_factory.is_null()); |
| 23 MaybeAddWorker(worker_factory, GROUP_DB); | 23 MaybeAddWorker(worker_factory, GROUP_DB); |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 workers_[group] = worker; | 280 workers_[group] = worker; |
| 281 } | 281 } |
| 282 } | 282 } |
| 283 | 283 |
| 284 ModelSafeGroup SyncBackendRegistrar::GetInitialGroupForType( | 284 ModelSafeGroup SyncBackendRegistrar::GetInitialGroupForType( |
| 285 ModelType type) const { | 285 ModelType type) const { |
| 286 return non_blocking_types_.Has(type) ? GROUP_NON_BLOCKING : GROUP_PASSIVE; | 286 return non_blocking_types_.Has(type) ? GROUP_NON_BLOCKING : GROUP_PASSIVE; |
| 287 } | 287 } |
| 288 | 288 |
| 289 } // namespace syncer | 289 } // namespace syncer |
| OLD | NEW |