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

Side by Side Diff: base/message_loop/message_loop.cc

Issue 1013813003: base: Mark MessageLoop::Post*Task API deprecated (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add TODO to task_runner(). Created 5 years, 9 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 | « base/message_loop/message_loop.h ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/message_loop/message_loop.h" 5 #include "base/message_loop/message_loop.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 268
269 void MessageLoop::RemoveDestructionObserver( 269 void MessageLoop::RemoveDestructionObserver(
270 DestructionObserver* destruction_observer) { 270 DestructionObserver* destruction_observer) {
271 DCHECK_EQ(this, current()); 271 DCHECK_EQ(this, current());
272 destruction_observers_.RemoveObserver(destruction_observer); 272 destruction_observers_.RemoveObserver(destruction_observer);
273 } 273 }
274 274
275 void MessageLoop::PostTask( 275 void MessageLoop::PostTask(
276 const tracked_objects::Location& from_here, 276 const tracked_objects::Location& from_here,
277 const Closure& task) { 277 const Closure& task) {
278 DCHECK(!task.is_null()) << from_here.ToString(); 278 message_loop_proxy_->PostTask(from_here, task);
279 incoming_task_queue_->AddToIncomingQueue(from_here, task, TimeDelta(), true);
280 } 279 }
281 280
282 void MessageLoop::PostDelayedTask( 281 void MessageLoop::PostDelayedTask(
283 const tracked_objects::Location& from_here, 282 const tracked_objects::Location& from_here,
284 const Closure& task, 283 const Closure& task,
285 TimeDelta delay) { 284 TimeDelta delay) {
286 DCHECK(!task.is_null()) << from_here.ToString(); 285 message_loop_proxy_->PostDelayedTask(from_here, task, delay);
287 incoming_task_queue_->AddToIncomingQueue(from_here, task, delay, true);
288 } 286 }
289 287
290 void MessageLoop::PostNonNestableTask( 288 void MessageLoop::PostNonNestableTask(
291 const tracked_objects::Location& from_here, 289 const tracked_objects::Location& from_here,
292 const Closure& task) { 290 const Closure& task) {
293 DCHECK(!task.is_null()) << from_here.ToString(); 291 message_loop_proxy_->PostNonNestableTask(from_here, task);
294 incoming_task_queue_->AddToIncomingQueue(from_here, task, TimeDelta(), false);
295 } 292 }
296 293
297 void MessageLoop::PostNonNestableDelayedTask( 294 void MessageLoop::PostNonNestableDelayedTask(
298 const tracked_objects::Location& from_here, 295 const tracked_objects::Location& from_here,
299 const Closure& task, 296 const Closure& task,
300 TimeDelta delay) { 297 TimeDelta delay) {
301 DCHECK(!task.is_null()) << from_here.ToString(); 298 message_loop_proxy_->PostNonNestableDelayedTask(from_here, task, delay);
302 incoming_task_queue_->AddToIncomingQueue(from_here, task, delay, false);
303 } 299 }
304 300
305 void MessageLoop::Run() { 301 void MessageLoop::Run() {
306 RunLoop run_loop; 302 RunLoop run_loop;
307 run_loop.Run(); 303 run_loop.Run();
308 } 304 }
309 305
310 void MessageLoop::RunUntilIdle() { 306 void MessageLoop::RunUntilIdle() {
311 RunLoop run_loop; 307 RunLoop run_loop;
312 run_loop.RunUntilIdle(); 308 run_loop.RunUntilIdle();
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 persistent, 711 persistent,
716 mode, 712 mode,
717 controller, 713 controller,
718 delegate); 714 delegate);
719 } 715 }
720 #endif 716 #endif
721 717
722 #endif // !defined(OS_NACL_SFI) 718 #endif // !defined(OS_NACL_SFI)
723 719
724 } // namespace base 720 } // namespace base
OLDNEW
« no previous file with comments | « base/message_loop/message_loop.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698