| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "sync/engine/sync_scheduler_impl.h" | 5 #include "sync/engine/sync_scheduler_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cstring> | 8 #include <cstring> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 842 sessions_commit_delay_ = new_delay; | 842 sessions_commit_delay_ = new_delay; |
| 843 } | 843 } |
| 844 | 844 |
| 845 void SyncSchedulerImpl::OnReceivedClientInvalidationHintBufferSize(int size) { | 845 void SyncSchedulerImpl::OnReceivedClientInvalidationHintBufferSize(int size) { |
| 846 if (size > 0) | 846 if (size > 0) |
| 847 nudge_tracker_.SetHintBufferSize(size); | 847 nudge_tracker_.SetHintBufferSize(size); |
| 848 else | 848 else |
| 849 NOTREACHED() << "Hint buffer size should be > 0."; | 849 NOTREACHED() << "Hint buffer size should be > 0."; |
| 850 } | 850 } |
| 851 | 851 |
| 852 void SyncSchedulerImpl::OnShouldStopSyncingPermanently() { | |
| 853 DCHECK(CalledOnValidThread()); | |
| 854 SDVLOG(2) << "OnShouldStopSyncingPermanently"; | |
| 855 Stop(); | |
| 856 Notify(SyncEngineEvent::STOP_SYNCING_PERMANENTLY); | |
| 857 } | |
| 858 | |
| 859 void SyncSchedulerImpl::OnActionableError( | 852 void SyncSchedulerImpl::OnActionableError( |
| 860 const sessions::SyncSessionSnapshot& snap) { | 853 const sessions::SyncSessionSnapshot& snap) { |
| 861 DCHECK(CalledOnValidThread()); | 854 DCHECK(CalledOnValidThread()); |
| 862 SDVLOG(2) << "OnActionableError"; | 855 SDVLOG(2) << "OnActionableError"; |
| 863 SyncEngineEvent event(SyncEngineEvent::ACTIONABLE_ERROR); | 856 SyncEngineEvent event(SyncEngineEvent::ACTIONABLE_ERROR); |
| 864 event.snapshot = snap; | 857 event.snapshot = snap; |
| 865 session_context_->NotifyListeners(event); | 858 session_context_->NotifyListeners(event); |
| 866 } | 859 } |
| 867 | 860 |
| 868 void SyncSchedulerImpl::OnSyncProtocolError( | 861 void SyncSchedulerImpl::OnSyncProtocolError( |
| (...skipping 24 matching lines...) Expand all Loading... |
| 893 | 886 |
| 894 #undef SDVLOG_LOC | 887 #undef SDVLOG_LOC |
| 895 | 888 |
| 896 #undef SDVLOG | 889 #undef SDVLOG |
| 897 | 890 |
| 898 #undef SLOG | 891 #undef SLOG |
| 899 | 892 |
| 900 #undef ENUM_CASE | 893 #undef ENUM_CASE |
| 901 | 894 |
| 902 } // namespace syncer | 895 } // namespace syncer |
| OLD | NEW |