| 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 "chrome/browser/chrome_notification_types.h" | 8 #include "chrome/browser/chrome_notification_types.h" |
| 9 #include "chrome/browser/invalidation/invalidation_service.h" | 9 #include "chrome/browser/invalidation/invalidation_service.h" |
| 10 #include "chrome/browser/invalidation/invalidation_service_factory.h" | 10 #include "chrome/browser/invalidation/invalidation_service_factory.h" |
| (...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 void SyncBackendHostImpl::HandlePassphraseTypeChangedOnFrontendLoop( | 718 void SyncBackendHostImpl::HandlePassphraseTypeChangedOnFrontendLoop( |
| 719 syncer::PassphraseType type, | 719 syncer::PassphraseType type, |
| 720 base::Time explicit_passphrase_time) { | 720 base::Time explicit_passphrase_time) { |
| 721 DCHECK_EQ(base::MessageLoop::current(), frontend_loop_); | 721 DCHECK_EQ(base::MessageLoop::current(), frontend_loop_); |
| 722 DVLOG(1) << "Passphrase type changed to " | 722 DVLOG(1) << "Passphrase type changed to " |
| 723 << syncer::PassphraseTypeToString(type); | 723 << syncer::PassphraseTypeToString(type); |
| 724 cached_passphrase_type_ = type; | 724 cached_passphrase_type_ = type; |
| 725 cached_explicit_passphrase_time_ = explicit_passphrase_time; | 725 cached_explicit_passphrase_time_ = explicit_passphrase_time; |
| 726 } | 726 } |
| 727 | 727 |
| 728 void SyncBackendHostImpl::HandleStopSyncingPermanentlyOnFrontendLoop() { | |
| 729 if (!frontend_) | |
| 730 return; | |
| 731 frontend_->OnStopSyncingPermanently(); | |
| 732 } | |
| 733 | |
| 734 void SyncBackendHostImpl::HandleConnectionStatusChangeOnFrontendLoop( | 728 void SyncBackendHostImpl::HandleConnectionStatusChangeOnFrontendLoop( |
| 735 syncer::ConnectionStatus status) { | 729 syncer::ConnectionStatus status) { |
| 736 if (!frontend_) | 730 if (!frontend_) |
| 737 return; | 731 return; |
| 738 | 732 |
| 739 DCHECK_EQ(base::MessageLoop::current(), frontend_loop_); | 733 DCHECK_EQ(base::MessageLoop::current(), frontend_loop_); |
| 740 | 734 |
| 741 DVLOG(1) << "Connection status changed: " | 735 DVLOG(1) << "Connection status changed: " |
| 742 << syncer::ConnectionStatusToString(status); | 736 << syncer::ConnectionStatusToString(status); |
| 743 frontend_->OnConnectionStatusChange(status); | 737 frontend_->OnConnectionStatusChange(status); |
| 744 } | 738 } |
| 745 | 739 |
| 746 base::MessageLoop* SyncBackendHostImpl::GetSyncLoopForTesting() { | 740 base::MessageLoop* SyncBackendHostImpl::GetSyncLoopForTesting() { |
| 747 return registrar_->sync_thread()->message_loop(); | 741 return registrar_->sync_thread()->message_loop(); |
| 748 } | 742 } |
| 749 | 743 |
| 750 } // namespace browser_sync | 744 } // namespace browser_sync |
| 751 | 745 |
| 752 #undef SDVLOG | 746 #undef SDVLOG |
| 753 | 747 |
| 754 #undef SLOG | 748 #undef SLOG |
| 755 | 749 |
| OLD | NEW |