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

Unified Diff: base/task_scheduler/task_scheduler.h

Issue 2873733003: Introduce SingleThreadTaskRunnerThreadMode (Closed)
Patch Set: Add missing "base" Created 3 years, 7 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
Index: base/task_scheduler/task_scheduler.h
diff --git a/base/task_scheduler/task_scheduler.h b/base/task_scheduler/task_scheduler.h
index e36f7de53910db734ccf14bb755943418c081bfc..594b3dedda8614d43a47312ec214e1502b75eb32 100644
--- a/base/task_scheduler/task_scheduler.h
+++ b/base/task_scheduler/task_scheduler.h
@@ -16,6 +16,7 @@
#include "base/strings/string_piece.h"
#include "base/task_runner.h"
#include "base/task_scheduler/scheduler_worker_pool_params.h"
+#include "base/task_scheduler/single_thread_task_runner_thread_mode.h"
#include "base/task_scheduler/task_traits.h"
#include "base/time/time.h"
#include "build/build_config.h"
@@ -92,7 +93,10 @@ class BASE_EXPORT TaskScheduler {
// scheduling tasks using |traits|. Tasks run on a single thread in posting
// order.
virtual scoped_refptr<SingleThreadTaskRunner>
- CreateSingleThreadTaskRunnerWithTraits(const TaskTraits& traits) = 0;
+ CreateSingleThreadTaskRunnerWithTraits(
+ const TaskTraits& traits,
+ SingleThreadTaskRunnerThreadMode thread_mode =
+ SingleThreadTaskRunnerThreadMode::SHARED) = 0;
#if defined(OS_WIN)
// Returns a SingleThreadTaskRunner whose PostTask invocations result in
@@ -104,7 +108,10 @@ class BASE_EXPORT TaskScheduler {
// apartments as necessary. In either case, care should be taken to make sure
// COM pointers are not smuggled across apartments.
virtual scoped_refptr<SingleThreadTaskRunner>
- CreateCOMSTATaskRunnerWithTraits(const TaskTraits& traits) = 0;
+ CreateCOMSTATaskRunnerWithTraits(
+ const TaskTraits& traits,
+ SingleThreadTaskRunnerThreadMode thread_mode =
+ SingleThreadTaskRunnerThreadMode::SHARED) = 0;
#endif // defined(OS_WIN)
// Returns a vector of all histograms available in this task scheduler.
« no previous file with comments | « base/task_scheduler/single_thread_task_runner_thread_mode.h ('k') | base/task_scheduler/task_scheduler_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698