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

Side by Side Diff: jingle/glue/thread_wrapper.cc

Issue 9187023: Convert use of int ms to TimeDelta in files owned by ajwong. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Remove static class instance initialization. Created 8 years, 11 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
« no previous file with comments | « chrome/service/service_process.cc ('k') | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "jingle/glue/thread_wrapper.h" 5 #include "jingle/glue/thread_wrapper.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/threading/thread_local.h" 10 #include "base/threading/thread_local.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 } 208 }
209 209
210 if (delay_ms <= 0) { 210 if (delay_ms <= 0) {
211 message_loop_->PostTask(FROM_HERE, 211 message_loop_->PostTask(FROM_HERE,
212 base::Bind(&JingleThreadWrapper::RunTask, 212 base::Bind(&JingleThreadWrapper::RunTask,
213 base::Unretained(this), task_id)); 213 base::Unretained(this), task_id));
214 } else { 214 } else {
215 message_loop_->PostDelayedTask(FROM_HERE, 215 message_loop_->PostDelayedTask(FROM_HERE,
216 base::Bind(&JingleThreadWrapper::RunTask, 216 base::Bind(&JingleThreadWrapper::RunTask,
217 base::Unretained(this), task_id), 217 base::Unretained(this), task_id),
218 delay_ms); 218 base::TimeDelta::FromMilliseconds(delay_ms));
219 } 219 }
220 } 220 }
221 221
222 void JingleThreadWrapper::RunTask(int task_id) { 222 void JingleThreadWrapper::RunTask(int task_id) {
223 bool have_message = false; 223 bool have_message = false;
224 talk_base::Message message; 224 talk_base::Message message;
225 { 225 {
226 base::AutoLock auto_lock(lock_); 226 base::AutoLock auto_lock(lock_);
227 MessagesQueue::iterator it = messages_.find(task_id); 227 MessagesQueue::iterator it = messages_.find(task_id);
228 if (it != messages_.end()) { 228 if (it != messages_.end()) {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 287
288 void JingleThreadWrapper::Stop() { 288 void JingleThreadWrapper::Stop() {
289 NOTREACHED(); 289 NOTREACHED();
290 } 290 }
291 291
292 void JingleThreadWrapper::Run() { 292 void JingleThreadWrapper::Run() {
293 NOTREACHED(); 293 NOTREACHED();
294 } 294 }
295 295
296 } // namespace jingle_glue 296 } // namespace jingle_glue
OLDNEW
« no previous file with comments | « chrome/service/service_process.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698