Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(312)

Side by Side Diff: sync/engine/sync_scheduler_impl.cc

Issue 14113050: sync: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | sync/engine/sync_scheduler_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | sync/engine/sync_scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698