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 <map> |
7 #include <utility> | 8 #include <utility> |
| 9 #include <vector> |
8 | 10 |
9 #include "base/command_line.h" | 11 #include "base/command_line.h" |
10 #include "base/location.h" | 12 #include "base/location.h" |
11 #include "base/logging.h" | 13 #include "base/logging.h" |
12 #include "base/single_thread_task_runner.h" | 14 #include "base/single_thread_task_runner.h" |
13 #include "components/invalidation/public/invalidation_service.h" | 15 #include "components/invalidation/public/invalidation_service.h" |
14 #include "components/invalidation/public/object_id_invalidation_map.h" | 16 #include "components/invalidation/public/object_id_invalidation_map.h" |
15 #include "components/signin/core/browser/signin_client.h" | 17 #include "components/signin/core/browser/signin_client.h" |
16 #include "components/sync_driver/glue/sync_backend_host_core.h" | 18 #include "components/sync_driver/glue/sync_backend_host_core.h" |
17 #include "components/sync_driver/glue/sync_backend_registrar.h" | 19 #include "components/sync_driver/glue/sync_backend_registrar.h" |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 registrar_->ActivateDataType(type, group, change_processor, GetUserShare()); | 434 registrar_->ActivateDataType(type, group, change_processor, GetUserShare()); |
433 } | 435 } |
434 | 436 |
435 void SyncBackendHostImpl::DeactivateDirectoryDataType(syncer::ModelType type) { | 437 void SyncBackendHostImpl::DeactivateDirectoryDataType(syncer::ModelType type) { |
436 registrar_->DeactivateDataType(type); | 438 registrar_->DeactivateDataType(type); |
437 } | 439 } |
438 | 440 |
439 void SyncBackendHostImpl::ActivateNonBlockingDataType( | 441 void SyncBackendHostImpl::ActivateNonBlockingDataType( |
440 syncer::ModelType type, | 442 syncer::ModelType type, |
441 scoped_ptr<syncer_v2::ActivationContext> activation_context) { | 443 scoped_ptr<syncer_v2::ActivationContext> activation_context) { |
| 444 registrar_->RegisterNonBlockingType(type); |
442 sync_context_proxy_->ConnectTypeToSync(type, std::move(activation_context)); | 445 sync_context_proxy_->ConnectTypeToSync(type, std::move(activation_context)); |
443 } | 446 } |
444 | 447 |
445 void SyncBackendHostImpl::DeactivateNonBlockingDataType( | 448 void SyncBackendHostImpl::DeactivateNonBlockingDataType( |
446 syncer::ModelType type) { | 449 syncer::ModelType type) { |
447 sync_context_proxy_->Disconnect(type); | 450 sync_context_proxy_->Disconnect(type); |
448 } | 451 } |
449 | 452 |
450 syncer::UserShare* SyncBackendHostImpl::GetUserShare() const { | 453 syncer::UserShare* SyncBackendHostImpl::GetUserShare() const { |
451 return core_->sync_manager()->GetUserShare(); | 454 return core_->sync_manager()->GetUserShare(); |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
857 const syncer::SyncManager::ClearServerDataCallback& frontend_callback) { | 860 const syncer::SyncManager::ClearServerDataCallback& frontend_callback) { |
858 DCHECK(ui_thread_->BelongsToCurrentThread()); | 861 DCHECK(ui_thread_->BelongsToCurrentThread()); |
859 frontend_callback.Run(); | 862 frontend_callback.Run(); |
860 } | 863 } |
861 | 864 |
862 } // namespace browser_sync | 865 } // namespace browser_sync |
863 | 866 |
864 #undef SDVLOG | 867 #undef SDVLOG |
865 | 868 |
866 #undef SLOG | 869 #undef SLOG |
OLD | NEW |