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

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

Issue 2899443002: Move code that sets up the environment to run a task to TaskTracker::PerformRunTask(). (Closed)
Patch Set: self-review 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_tracker_posix.h ('k') | no next file » | 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_tracker_posix.h" 5 #include "base/task_scheduler/task_tracker_posix.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/files/file_descriptor_watcher_posix.h" 9 #include "base/files/file_descriptor_watcher_posix.h"
10 10
11 namespace base { 11 namespace base {
12 namespace internal { 12 namespace internal {
13 13
14 TaskTrackerPosix::TaskTrackerPosix() = default; 14 TaskTrackerPosix::TaskTrackerPosix() = default;
15 TaskTrackerPosix::~TaskTrackerPosix() = default; 15 TaskTrackerPosix::~TaskTrackerPosix() = default;
16 16
17 void TaskTrackerPosix::PerformRunTask(std::unique_ptr<Task> task) { 17 void TaskTrackerPosix::PerformRunTask(std::unique_ptr<Task> task,
18 const SequenceToken& sequence_token) {
18 DCHECK(watch_file_descriptor_message_loop_); 19 DCHECK(watch_file_descriptor_message_loop_);
19 FileDescriptorWatcher file_descriptor_watcher( 20 FileDescriptorWatcher file_descriptor_watcher(
20 watch_file_descriptor_message_loop_); 21 watch_file_descriptor_message_loop_);
21 TaskTracker::PerformRunTask(std::move(task)); 22 TaskTracker::PerformRunTask(std::move(task), sequence_token);
22 } 23 }
23 24
24 #if DCHECK_IS_ON() 25 #if DCHECK_IS_ON()
25 bool TaskTrackerPosix::IsPostingBlockShutdownTaskAfterShutdownAllowed() { 26 bool TaskTrackerPosix::IsPostingBlockShutdownTaskAfterShutdownAllowed() {
26 return service_thread_handle_.is_equal(PlatformThread::CurrentHandle()); 27 return service_thread_handle_.is_equal(PlatformThread::CurrentHandle());
27 } 28 }
28 #endif 29 #endif
29 30
30 } // namespace internal 31 } // namespace internal
31 } // namespace base 32 } // namespace base
OLDNEW
« no previous file with comments | « base/task_scheduler/task_tracker_posix.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698