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_impl.h" | 5 #include "chrome/browser/sync/glue/sync_backend_host_impl.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
619 base::Bind(&SyncBackendHostCore::DoRefreshTypes, core_.get(), types)); | 619 base::Bind(&SyncBackendHostCore::DoRefreshTypes, core_.get(), types)); |
620 } | 620 } |
621 | 621 |
622 void SyncBackendHostImpl::AddExperimentalTypes() { | 622 void SyncBackendHostImpl::AddExperimentalTypes() { |
623 CHECK(initialized()); | 623 CHECK(initialized()); |
624 syncer::Experiments experiments; | 624 syncer::Experiments experiments; |
625 if (core_->sync_manager()->ReceivedExperiment(&experiments)) | 625 if (core_->sync_manager()->ReceivedExperiment(&experiments)) |
626 frontend_->OnExperimentsChanged(experiments); | 626 frontend_->OnExperimentsChanged(experiments); |
627 } | 627 } |
628 | 628 |
629 void SyncBackendHostImpl::HandleControlTypesDownloadRetry() { | |
630 DCHECK_EQ(base::MessageLoop::current(), frontend_loop_); | |
631 if (!frontend_) | |
632 return; | |
633 | |
634 frontend_->OnSyncConfigureRetry(); | |
635 } | |
636 | |
637 void SyncBackendHostImpl::HandleInitializationSuccessOnFrontendLoop( | 629 void SyncBackendHostImpl::HandleInitializationSuccessOnFrontendLoop( |
638 const syncer::WeakHandle<syncer::JsBackend> js_backend, | 630 const syncer::WeakHandle<syncer::JsBackend> js_backend, |
639 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener> | 631 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener> |
640 debug_info_listener, | 632 debug_info_listener, |
641 syncer::SyncContextProxy* sync_context_proxy, | 633 syncer::SyncContextProxy* sync_context_proxy, |
642 const std::string& cache_guid) { | 634 const std::string& cache_guid) { |
643 DCHECK_EQ(base::MessageLoop::current(), frontend_loop_); | 635 DCHECK_EQ(base::MessageLoop::current(), frontend_loop_); |
644 | 636 |
645 if (sync_context_proxy) | 637 if (sync_context_proxy) |
646 sync_context_proxy_ = sync_context_proxy->Clone(); | 638 sync_context_proxy_ = sync_context_proxy->Clone(); |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
871 | 863 |
872 base::MessageLoop* SyncBackendHostImpl::GetSyncLoopForTesting() { | 864 base::MessageLoop* SyncBackendHostImpl::GetSyncLoopForTesting() { |
873 return registrar_->sync_thread()->message_loop(); | 865 return registrar_->sync_thread()->message_loop(); |
874 } | 866 } |
875 | 867 |
876 } // namespace browser_sync | 868 } // namespace browser_sync |
877 | 869 |
878 #undef SDVLOG | 870 #undef SDVLOG |
879 | 871 |
880 #undef SLOG | 872 #undef SLOG |
OLD | NEW |