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

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

Issue 2692273008: Hacky slashy (Closed)
Patch Set: rebase on config CL, and minor fixes 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 unified diff | Download patch
« no previous file with comments | « base/task_scheduler/task_scheduler_impl.h ('k') | base/test/launcher/test_launcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/task_scheduler/delayed_task_manager.h" 10 #include "base/task_scheduler/delayed_task_manager.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 Thread::Options service_thread_options; 86 Thread::Options service_thread_options;
87 service_thread_options.message_loop_type = 87 service_thread_options.message_loop_type =
88 #if defined(OS_POSIX) && !defined(OS_NACL_SFI) 88 #if defined(OS_POSIX) && !defined(OS_NACL_SFI)
89 MessageLoop::TYPE_IO; 89 MessageLoop::TYPE_IO;
90 #else 90 #else
91 MessageLoop::TYPE_DEFAULT; 91 MessageLoop::TYPE_DEFAULT;
92 #endif 92 #endif
93 service_thread_options.timer_slack = TIMER_SLACK_MAXIMUM; 93 service_thread_options.timer_slack = TIMER_SLACK_MAXIMUM;
94 CHECK(service_thread_.StartWithOptions(service_thread_options)); 94 CHECK(service_thread_.StartWithOptions(service_thread_options));
95 95
96 #if defined(OS_POSIX) && !defined(OS_NACL_SFI) 96 #if defined(OS_POSIX) && !defined(OS_NACL_SFI) && !defined(OS_FUCHSIA)
97 // Needs to happen after starting the service thread to get its 97 // Needs to happen after starting the service thread to get its
98 // message_loop(). 98 // message_loop().
99 task_tracker_.set_watch_file_descriptor_message_loop( 99 task_tracker_.set_watch_file_descriptor_message_loop(
100 static_cast<MessageLoopForIO*>(service_thread_.message_loop())); 100 static_cast<MessageLoopForIO*>(service_thread_.message_loop()));
101 101
102 #if DCHECK_IS_ON() 102 #if DCHECK_IS_ON()
103 task_tracker_.set_service_thread_handle(service_thread_.GetThreadHandle()); 103 task_tracker_.set_service_thread_handle(service_thread_.GetThreadHandle());
104 #endif // DCHECK_IS_ON() 104 #endif // DCHECK_IS_ON()
105 #endif // defined(OS_POSIX) && !defined(OS_NACL_SFI) 105 #endif // defined(OS_POSIX) && !defined(OS_NACL_SFI)
106 106
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 #endif 198 #endif
199 } 199 }
200 200
201 SchedulerWorkerPoolImpl* TaskSchedulerImpl::GetWorkerPoolForTraits( 201 SchedulerWorkerPoolImpl* TaskSchedulerImpl::GetWorkerPoolForTraits(
202 const TaskTraits& traits) const { 202 const TaskTraits& traits) const {
203 return worker_pools_[GetEnvironmentIndexForTraits(traits)].get(); 203 return worker_pools_[GetEnvironmentIndexForTraits(traits)].get();
204 } 204 }
205 205
206 } // namespace internal 206 } // namespace internal
207 } // namespace base 207 } // namespace base
OLDNEW
« no previous file with comments | « base/task_scheduler/task_scheduler_impl.h ('k') | base/test/launcher/test_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698