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

Side by Side Diff: base/message_loop/incoming_task_queue.h

Issue 2637843002: Migrate base::TaskRunner from Closure to OnceClosure (Closed)
Patch Set: rebase Created 3 years, 8 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/deferred_sequenced_task_runner.cc ('k') | base/message_loop/incoming_task_queue.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 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 #ifndef BASE_MESSAGE_LOOP_INCOMING_TASK_QUEUE_H_ 5 #ifndef BASE_MESSAGE_LOOP_INCOMING_TASK_QUEUE_H_
6 #define BASE_MESSAGE_LOOP_INCOMING_TASK_QUEUE_H_ 6 #define BASE_MESSAGE_LOOP_INCOMING_TASK_QUEUE_H_
7 7
8 #include "base/base_export.h" 8 #include "base/base_export.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 18 matching lines...) Expand all
29 explicit IncomingTaskQueue(MessageLoop* message_loop); 29 explicit IncomingTaskQueue(MessageLoop* message_loop);
30 30
31 // Appends a task to the incoming queue. Posting of all tasks is routed though 31 // Appends a task to the incoming queue. Posting of all tasks is routed though
32 // AddToIncomingQueue() or TryAddToIncomingQueue() to make sure that posting 32 // AddToIncomingQueue() or TryAddToIncomingQueue() to make sure that posting
33 // task is properly synchronized between different threads. 33 // task is properly synchronized between different threads.
34 // 34 //
35 // Returns true if the task was successfully added to the queue, otherwise 35 // Returns true if the task was successfully added to the queue, otherwise
36 // returns false. In all cases, the ownership of |task| is transferred to the 36 // returns false. In all cases, the ownership of |task| is transferred to the
37 // called method. 37 // called method.
38 bool AddToIncomingQueue(const tracked_objects::Location& from_here, 38 bool AddToIncomingQueue(const tracked_objects::Location& from_here,
39 Closure task, 39 OnceClosure task,
40 TimeDelta delay, 40 TimeDelta delay,
41 bool nestable); 41 bool nestable);
42 42
43 // Returns true if the queue contains tasks that require higher than default 43 // Returns true if the queue contains tasks that require higher than default
44 // timer resolution. Currently only needed for Windows. 44 // timer resolution. Currently only needed for Windows.
45 bool HasHighResolutionTasks(); 45 bool HasHighResolutionTasks();
46 46
47 // Returns true if the message loop is "idle". Provided for testing. 47 // Returns true if the message loop is "idle". Provided for testing.
48 bool IsIdleForTesting(); 48 bool IsIdleForTesting();
49 49
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // False until StartScheduling() is called. 106 // False until StartScheduling() is called.
107 bool is_ready_for_scheduling_; 107 bool is_ready_for_scheduling_;
108 108
109 DISALLOW_COPY_AND_ASSIGN(IncomingTaskQueue); 109 DISALLOW_COPY_AND_ASSIGN(IncomingTaskQueue);
110 }; 110 };
111 111
112 } // namespace internal 112 } // namespace internal
113 } // namespace base 113 } // namespace base
114 114
115 #endif // BASE_MESSAGE_LOOP_INCOMING_TASK_QUEUE_H_ 115 #endif // BASE_MESSAGE_LOOP_INCOMING_TASK_QUEUE_H_
OLDNEW
« no previous file with comments | « base/deferred_sequenced_task_runner.cc ('k') | base/message_loop/incoming_task_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698