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 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 // | 219 // |
220 // In all cases except (2), we want to retry contacting the server. We | 220 // In all cases except (2), we want to retry contacting the server. We |
221 // call TryCanaryJob to achieve this, and note that nothing -- not even a | 221 // call TryCanaryJob to achieve this, and note that nothing -- not even a |
222 // canary job -- can bypass a THROTTLED WaitInterval. The only thing that | 222 // canary job -- can bypass a THROTTLED WaitInterval. The only thing that |
223 // has the authority to do that is the Unthrottle timer. | 223 // has the authority to do that is the Unthrottle timer. |
224 TryCanaryJob(); | 224 TryCanaryJob(); |
225 } | 225 } |
226 | 226 |
227 void SyncSchedulerImpl::Start(Mode mode, base::Time last_poll_time) { | 227 void SyncSchedulerImpl::Start(Mode mode, base::Time last_poll_time) { |
228 DCHECK(CalledOnValidThread()); | 228 DCHECK(CalledOnValidThread()); |
229 std::string thread_name = base::MessageLoop::current()->thread_name(); | 229 std::string thread_name = base::MessageLoop::current()->GetThreadName(); |
230 if (thread_name.empty()) | 230 if (thread_name.empty()) |
231 thread_name = "<Main thread>"; | 231 thread_name = "<Main thread>"; |
232 SDVLOG(2) << "Start called from thread " | 232 SDVLOG(2) << "Start called from thread " |
233 << thread_name << " with mode " << GetModeString(mode); | 233 << thread_name << " with mode " << GetModeString(mode); |
234 if (!started_) { | 234 if (!started_) { |
235 started_ = true; | 235 started_ = true; |
236 SendInitialSnapshot(); | 236 SendInitialSnapshot(); |
237 } | 237 } |
238 | 238 |
239 DCHECK(syncer_.get()); | 239 DCHECK(syncer_.get()); |
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
988 | 988 |
989 #undef SDVLOG_LOC | 989 #undef SDVLOG_LOC |
990 | 990 |
991 #undef SDVLOG | 991 #undef SDVLOG |
992 | 992 |
993 #undef SLOG | 993 #undef SLOG |
994 | 994 |
995 #undef ENUM_CASE | 995 #undef ENUM_CASE |
996 | 996 |
997 } // namespace syncer | 997 } // namespace syncer |
OLD | NEW |