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

Side by Side Diff: base/task_scheduler/post_task.cc

Issue 2768873007: Add Support to Get a COM STA Task Runner from the Task Scheduler API (Closed)
Patch Set: Created 3 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/task_scheduler/post_task.h" 5 #include "base/task_scheduler/post_task.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/task_scheduler/task_scheduler.h" 10 #include "base/task_scheduler/task_scheduler.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 } 88 }
89 89
90 scoped_refptr<SingleThreadTaskRunner> CreateSingleThreadTaskRunnerWithTraits( 90 scoped_refptr<SingleThreadTaskRunner> CreateSingleThreadTaskRunnerWithTraits(
91 const TaskTraits& traits) { 91 const TaskTraits& traits) {
92 DCHECK(TaskScheduler::GetInstance()) 92 DCHECK(TaskScheduler::GetInstance())
93 << "Ref. Prerequisite section of post_task.h"; 93 << "Ref. Prerequisite section of post_task.h";
94 return TaskScheduler::GetInstance()->CreateSingleThreadTaskRunnerWithTraits( 94 return TaskScheduler::GetInstance()->CreateSingleThreadTaskRunnerWithTraits(
95 traits); 95 traits);
96 } 96 }
97 97
98 #if defined(OS_WIN)
99 scoped_refptr<SingleThreadTaskRunner> CreateCOMSTATaskRunnerWithTraits(
100 const TaskTraits& traits) {
101 DCHECK(TaskScheduler::GetInstance())
102 << "Ref. Prerequisite section of post_task.h";
103 return TaskScheduler::GetInstance()->CreateCOMSTATaskRunnerWithTraits(traits);
104 }
105 #endif // defined(OS_WIN)
106
98 } // namespace base 107 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698