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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 // | 204 // |
205 // In all cases except (2), we want to retry contacting the server. We | 205 // In all cases except (2), we want to retry contacting the server. We |
206 // call DoCanaryJob to achieve this, and note that nothing -- not even a | 206 // call DoCanaryJob to achieve this, and note that nothing -- not even a |
207 // canary job -- can bypass a THROTTLED WaitInterval. The only thing that | 207 // canary job -- can bypass a THROTTLED WaitInterval. The only thing that |
208 // has the authority to do that is the Unthrottle timer. | 208 // has the authority to do that is the Unthrottle timer. |
209 TryCanaryJob(); | 209 TryCanaryJob(); |
210 } | 210 } |
211 | 211 |
212 void SyncSchedulerImpl::Start(Mode mode) { | 212 void SyncSchedulerImpl::Start(Mode mode) { |
213 DCHECK(CalledOnValidThread()); | 213 DCHECK(CalledOnValidThread()); |
214 std::string thread_name = MessageLoop::current()->thread_name(); | 214 std::string thread_name = base::MessageLoop::current()->thread_name(); |
215 if (thread_name.empty()) | 215 if (thread_name.empty()) |
216 thread_name = "<Main thread>"; | 216 thread_name = "<Main thread>"; |
217 SDVLOG(2) << "Start called from thread " | 217 SDVLOG(2) << "Start called from thread " |
218 << thread_name << " with mode " << GetModeString(mode); | 218 << thread_name << " with mode " << GetModeString(mode); |
219 if (!started_) { | 219 if (!started_) { |
220 started_ = true; | 220 started_ = true; |
221 SendInitialSnapshot(); | 221 SendInitialSnapshot(); |
222 } | 222 } |
223 | 223 |
224 DCHECK(!session_context_->account_name().empty()); | 224 DCHECK(!session_context_->account_name().empty()); |
(...skipping 597 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 |