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

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

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.cc ('k') | base/task_scheduler/task_tracker_posix.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 #ifndef BASE_TASK_SCHEDULER_TASK_TRACKER_POSIX_H_ 5 #ifndef BASE_TASK_SCHEDULER_TASK_TRACKER_POSIX_H_
6 #define BASE_TASK_SCHEDULER_TASK_TRACKER_POSIX_H_ 6 #define BASE_TASK_SCHEDULER_TASK_TRACKER_POSIX_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/base_export.h" 10 #include "base/base_export.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // service thread is exempted from the task scheduler shutdown DCHECKs. 45 // service thread is exempted from the task scheduler shutdown DCHECKs.
46 void set_service_thread_handle( 46 void set_service_thread_handle(
47 const PlatformThreadHandle& service_thread_handle) { 47 const PlatformThreadHandle& service_thread_handle) {
48 DCHECK(!service_thread_handle.is_null()); 48 DCHECK(!service_thread_handle.is_null());
49 service_thread_handle_ = service_thread_handle; 49 service_thread_handle_ = service_thread_handle;
50 } 50 }
51 #endif 51 #endif
52 52
53 private: 53 private:
54 // TaskTracker: 54 // TaskTracker:
55 void PerformRunTask(std::unique_ptr<Task> task) override; 55 void PerformRunTask(std::unique_ptr<Task> task,
56 const SequenceToken& sequence_token) override;
56 57
57 #if DCHECK_IS_ON() 58 #if DCHECK_IS_ON()
58 bool IsPostingBlockShutdownTaskAfterShutdownAllowed() override; 59 bool IsPostingBlockShutdownTaskAfterShutdownAllowed() override;
59 #endif 60 #endif
60 61
61 MessageLoopForIO* watch_file_descriptor_message_loop_ = nullptr; 62 MessageLoopForIO* watch_file_descriptor_message_loop_ = nullptr;
62 63
63 #if DCHECK_IS_ON() 64 #if DCHECK_IS_ON()
64 PlatformThreadHandle service_thread_handle_; 65 PlatformThreadHandle service_thread_handle_;
65 #endif 66 #endif
66 67
67 DISALLOW_COPY_AND_ASSIGN(TaskTrackerPosix); 68 DISALLOW_COPY_AND_ASSIGN(TaskTrackerPosix);
68 }; 69 };
69 70
70 } // namespace internal 71 } // namespace internal
71 } // namespace base 72 } // namespace base
72 73
73 #endif // BASE_TASK_SCHEDULER_TASK_TRACKER_POSIX_H_ 74 #endif // BASE_TASK_SCHEDULER_TASK_TRACKER_POSIX_H_
OLDNEW
« no previous file with comments | « base/task_scheduler/task_tracker.cc ('k') | base/task_scheduler/task_tracker_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698