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

Unified Diff: base/message_loop/message_loop.h

Issue 551183002: Microbenchmark for the cost of posting tasks to different pump types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove format_macros.h includes Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/base.gyp ('k') | base/message_loop/message_pump_perftest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop/message_loop.h
diff --git a/base/message_loop/message_loop.h b/base/message_loop/message_loop.h
index 8db1e77daf38b21e191df7c0108b6abe0d6571fe..3cec37e1a0b87b6e0a1aae873a2e21405ecb4fdf 100644
--- a/base/message_loop/message_loop.h
+++ b/base/message_loop/message_loop.h
@@ -391,12 +391,22 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
// Returns true if the message loop is "idle". Provided for testing.
bool IsIdleForTesting();
+ // Wakes up the message pump. Can be called on any thread. The caller is
+ // responsible for synchronizing ScheduleWork() calls.
+ void ScheduleWork(bool was_empty);
+
+ // Returns the TaskAnnotator which is used to add debug information to posted
+ // tasks.
+ debug::TaskAnnotator* task_annotator() { return &task_annotator_; }
+
+ // Runs the specified PendingTask.
+ void RunTask(const PendingTask& pending_task);
+
//----------------------------------------------------------------------------
protected:
scoped_ptr<MessagePump> pump_;
private:
- friend class internal::IncomingTaskQueue;
friend class RunLoop;
// Configures various members for the two constructors.
@@ -408,9 +418,6 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
// Called to process any delayed non-nestable tasks.
bool ProcessNextDelayedNonNestableTask();
- // Runs the specified PendingTask.
- void RunTask(const PendingTask& pending_task);
-
// Calls RunTask or queues the pending_task on the deferred task list if it
// cannot be run right now. Returns true if the task was run.
bool DeferOrRunPendingTask(const PendingTask& pending_task);
@@ -423,18 +430,10 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
// true if some work was done.
bool DeletePendingTasks();
- // Returns the TaskAnnotator which is used to add debug information to posted
- // tasks.
- debug::TaskAnnotator* task_annotator() { return &task_annotator_; }
-
// Loads tasks from the incoming queue to |work_queue_| if the latter is
// empty.
void ReloadWorkQueue();
- // Wakes up the message pump. Can be called on any thread. The caller is
- // responsible for synchronizing ScheduleWork() calls.
- void ScheduleWork(bool was_empty);
-
// Start recording histogram info about events and action IF it was enabled
// and IF the statistics recorder can accept a registration of our histogram.
void StartHistogrammer();
« no previous file with comments | « base/base.gyp ('k') | base/message_loop/message_pump_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698