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

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

Issue 2891363005: Add ScopedTaskEnvironment::ExecutionControlMode. (Closed)
Patch Set: CR-gab-31 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/test/scoped_task_environment.h » ('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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // TODO(robliao): http://crbug.com/698140. This addresses service thread tasks 43 // TODO(robliao): http://crbug.com/698140. This addresses service thread tasks
44 // that could run after the task scheduler has shut down. Anything from the 44 // that could run after the task scheduler has shut down. Anything from the
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 protected:
54 // TaskTracker: 54 // TaskTracker:
55 void PerformRunTask(std::unique_ptr<Task> task, 55 void PerformRunTask(std::unique_ptr<Task> task,
56 const SequenceToken& sequence_token) override; 56 const SequenceToken& sequence_token) override;
57 57
58 private:
58 #if DCHECK_IS_ON() 59 #if DCHECK_IS_ON()
59 bool IsPostingBlockShutdownTaskAfterShutdownAllowed() override; 60 bool IsPostingBlockShutdownTaskAfterShutdownAllowed() override;
60 #endif 61 #endif
61 62
62 MessageLoopForIO* watch_file_descriptor_message_loop_ = nullptr; 63 MessageLoopForIO* watch_file_descriptor_message_loop_ = nullptr;
63 64
64 #if DCHECK_IS_ON() 65 #if DCHECK_IS_ON()
65 PlatformThreadHandle service_thread_handle_; 66 PlatformThreadHandle service_thread_handle_;
66 #endif 67 #endif
67 68
68 DISALLOW_COPY_AND_ASSIGN(TaskTrackerPosix); 69 DISALLOW_COPY_AND_ASSIGN(TaskTrackerPosix);
69 }; 70 };
70 71
71 } // namespace internal 72 } // namespace internal
72 } // namespace base 73 } // namespace base
73 74
74 #endif // BASE_TASK_SCHEDULER_TASK_TRACKER_POSIX_H_ 75 #endif // BASE_TASK_SCHEDULER_TASK_TRACKER_POSIX_H_
OLDNEW
« no previous file with comments | « base/task_scheduler/task_tracker.cc ('k') | base/test/scoped_task_environment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698