| 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 } | 172 } |
| 173 | 173 |
| 174 SyncSchedulerImpl::~SyncSchedulerImpl() { | 174 SyncSchedulerImpl::~SyncSchedulerImpl() { |
| 175 DCHECK(CalledOnValidThread()); | 175 DCHECK(CalledOnValidThread()); |
| 176 StopImpl(base::Closure()); | 176 StopImpl(base::Closure()); |
| 177 } | 177 } |
| 178 | 178 |
| 179 void SyncSchedulerImpl::OnCredentialsUpdated() { | 179 void SyncSchedulerImpl::OnCredentialsUpdated() { |
| 180 DCHECK(CalledOnValidThread()); | 180 DCHECK(CalledOnValidThread()); |
| 181 | 181 |
| 182 if (HttpResponse::SYNC_AUTH_ERROR == | 182 if (HttpResponse::TOKEN_REFRESHED == |
| 183 session_context_->connection_manager()->server_status()) { | 183 session_context_->connection_manager()->server_status()) { |
| 184 OnServerConnectionErrorFixed(); | 184 OnServerConnectionErrorFixed(); |
| 185 } | 185 } |
| 186 } | 186 } |
| 187 | 187 |
| 188 void SyncSchedulerImpl::OnConnectionStatusChange() { | 188 void SyncSchedulerImpl::OnConnectionStatusChange() { |
| 189 if (HttpResponse::CONNECTION_UNAVAILABLE == | 189 if (HttpResponse::CONNECTION_UNAVAILABLE == |
| 190 session_context_->connection_manager()->server_status()) { | 190 session_context_->connection_manager()->server_status()) { |
| 191 // Optimistically assume that the connection is fixed and try | 191 // Optimistically assume that the connection is fixed and try |
| 192 // connecting. | 192 // connecting. |
| (...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 822 | 822 |
| 823 #undef SDVLOG_LOC | 823 #undef SDVLOG_LOC |
| 824 | 824 |
| 825 #undef SDVLOG | 825 #undef SDVLOG |
| 826 | 826 |
| 827 #undef SLOG | 827 #undef SLOG |
| 828 | 828 |
| 829 #undef ENUM_CASE | 829 #undef ENUM_CASE |
| 830 | 830 |
| 831 } // namespace syncer | 831 } // namespace syncer |
| OLD | NEW |