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

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

Issue 2629583003: Remove TaskTraits::with_file_io(). (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | components/task_scheduler_util/browser/initialization.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_TRAITS_H_ 5 #ifndef BASE_TASK_SCHEDULER_TASK_TRAITS_H_
6 #define BASE_TASK_SCHEDULER_TASK_TRAITS_H_ 6 #define BASE_TASK_SCHEDULER_TASK_TRAITS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <iosfwd> 10 #include <iosfwd>
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 134
135 // Applies |shutdown_behavior| to tasks with these traits. 135 // Applies |shutdown_behavior| to tasks with these traits.
136 TaskTraits& WithShutdownBehavior(TaskShutdownBehavior shutdown_behavior); 136 TaskTraits& WithShutdownBehavior(TaskShutdownBehavior shutdown_behavior);
137 137
138 // Returns true if tasks with these traits may block. 138 // Returns true if tasks with these traits may block.
139 bool may_block() const { return may_block_; } 139 bool may_block() const { return may_block_; }
140 140
141 // Returns true if tasks with these traits may use base/ sync primitives. 141 // Returns true if tasks with these traits may use base/ sync primitives.
142 bool with_base_sync_primitives() const { return with_base_sync_primitives_; } 142 bool with_base_sync_primitives() const { return with_base_sync_primitives_; }
143 143
144 // DEPRECATED
145 // TODO(fdoray): Remove this as part of crbug.com/675660
146 bool with_file_io() const { return may_block(); }
147
148 // Returns the priority of tasks with these traits. 144 // Returns the priority of tasks with these traits.
149 TaskPriority priority() const { return priority_; } 145 TaskPriority priority() const { return priority_; }
150 146
151 // Returns the shutdown behavior of tasks with these traits. 147 // Returns the shutdown behavior of tasks with these traits.
152 TaskShutdownBehavior shutdown_behavior() const { return shutdown_behavior_; } 148 TaskShutdownBehavior shutdown_behavior() const { return shutdown_behavior_; }
153 149
154 private: 150 private:
155 bool may_block_; 151 bool may_block_;
156 bool with_base_sync_primitives_; 152 bool with_base_sync_primitives_;
157 TaskPriority priority_; 153 TaskPriority priority_;
(...skipping 10 matching lines...) Expand all
168 // DCHECK and EXPECT statements. 164 // DCHECK and EXPECT statements.
169 BASE_EXPORT std::ostream& operator<<(std::ostream& os, 165 BASE_EXPORT std::ostream& operator<<(std::ostream& os,
170 const TaskPriority& shutdown_behavior); 166 const TaskPriority& shutdown_behavior);
171 BASE_EXPORT std::ostream& operator<<( 167 BASE_EXPORT std::ostream& operator<<(
172 std::ostream& os, 168 std::ostream& os,
173 const TaskShutdownBehavior& shutdown_behavior); 169 const TaskShutdownBehavior& shutdown_behavior);
174 170
175 } // namespace base 171 } // namespace base
176 172
177 #endif // BASE_TASK_SCHEDULER_TASK_TRAITS_H_ 173 #endif // BASE_TASK_SCHEDULER_TASK_TRAITS_H_
OLDNEW
« no previous file with comments | « no previous file | components/task_scheduler_util/browser/initialization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698