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

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

Issue 2692273008: Hacky slashy (Closed)
Patch Set: mostly working test runner Created 3 years, 10 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/task_scheduler_impl.h" 5 #include "base/task_scheduler/task_scheduler_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 MessageLoop::TYPE_IO; 129 MessageLoop::TYPE_IO;
130 #else 130 #else
131 MessageLoop::TYPE_DEFAULT; 131 MessageLoop::TYPE_DEFAULT;
132 #endif 132 #endif
133 service_thread_options.timer_slack = TIMER_SLACK_MAXIMUM; 133 service_thread_options.timer_slack = TIMER_SLACK_MAXIMUM;
134 CHECK(service_thread_.StartWithOptions(service_thread_options)); 134 CHECK(service_thread_.StartWithOptions(service_thread_options));
135 135
136 // Instantiate TaskTracker. Needs to happen after starting the service thread 136 // Instantiate TaskTracker. Needs to happen after starting the service thread
137 // to get its message_loop(). 137 // to get its message_loop().
138 task_tracker_ = 138 task_tracker_ =
139 #if defined(OS_POSIX) && !defined(OS_NACL_SFI) 139 #if defined(OS_POSIX) && !defined(OS_NACL_SFI) && !defined(OS_FUCHSIA)
140 base::MakeUnique<TaskTrackerPosix>( 140 base::MakeUnique<TaskTrackerPosix>(
141 static_cast<MessageLoopForIO*>(service_thread_.message_loop())); 141 static_cast<MessageLoopForIO*>(service_thread_.message_loop()));
142 #else 142 #else
143 base::MakeUnique<TaskTracker>(); 143 base::MakeUnique<TaskTracker>();
144 #endif 144 #endif
145 145
146 // Instantiate DelayedTaskManager. Needs to happen after starting the service 146 // Instantiate DelayedTaskManager. Needs to happen after starting the service
147 // thread to get its task_runner(). 147 // thread to get its task_runner().
148 delayed_task_manager_ = 148 delayed_task_manager_ =
149 base::MakeUnique<DelayedTaskManager>(service_thread_.task_runner()); 149 base::MakeUnique<DelayedTaskManager>(service_thread_.task_runner());
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 // in |sequence|. 184 // in |sequence|.
185 const TaskTraits traits = 185 const TaskTraits traits =
186 sequence->PeekTaskTraits().WithPriority(sort_key.priority()); 186 sequence->PeekTaskTraits().WithPriority(sort_key.priority());
187 187
188 GetWorkerPoolForTraits(traits)->ReEnqueueSequence(std::move(sequence), 188 GetWorkerPoolForTraits(traits)->ReEnqueueSequence(std::move(sequence),
189 sort_key); 189 sort_key);
190 } 190 }
191 191
192 } // namespace internal 192 } // namespace internal
193 } // namespace base 193 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698