Index: base/single_thread_task_runner.h |
diff --git a/base/single_thread_task_runner.h b/base/single_thread_task_runner.h |
index c87e5f7ff1438c4599b18d5c146b2de89c9476ef..46d2ab418310a7f52b57b1bc87dc647a04df3eeb 100644 |
--- a/base/single_thread_task_runner.h |
+++ b/base/single_thread_task_runner.h |
@@ -32,6 +32,14 @@ class BASE_EXPORT SingleThreadTaskRunner : public SequencedTaskRunner { |
return RunsTasksOnCurrentThread(); |
} |
+ // Gets the SingleThreadTaskRunner for the current thread. |
+ static scoped_refptr<SingleThreadTaskRunner> current(); |
+ |
+ // Sets SingleThreadTaskRunner for the current thread. The caller |
+ // must keep a reference to the task runner and call this method |
+ // again with new_current=NULL before dropping that reference. |
+ static void SetCurrent(SingleThreadTaskRunner* new_current); |
+ |
protected: |
virtual ~SingleThreadTaskRunner() {} |
}; |