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

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

Issue 2603603002: Remove deprecated methods TaskTraits::WithFileIO()/WithWait(). (Closed)
Patch Set: Created 3 years, 12 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/post_task.h ('k') | base/task_scheduler/task_traits.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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // Avoid creating threads. Instead, use 115 // Avoid creating threads. Instead, use
116 // base::Create(Sequenced|SingleTreaded)TaskRunnerWithTraits(). If a thread is 116 // base::Create(Sequenced|SingleTreaded)TaskRunnerWithTraits(). If a thread is
117 // really needed, make it non-joinable and add cleanup work at the end of the 117 // really needed, make it non-joinable and add cleanup work at the end of the
118 // thread's main function (if using base::Thread, override Cleanup()). 118 // thread's main function (if using base::Thread, override Cleanup()).
119 // 119 //
120 // MayBlock() must be specified in conjunction with this trait if and only if 120 // MayBlock() must be specified in conjunction with this trait if and only if
121 // removing usage of sync primitives in the labeled tasks would still result 121 // removing usage of sync primitives in the labeled tasks would still result
122 // in tasks that may block (per MayBlock()'s definition). 122 // in tasks that may block (per MayBlock()'s definition).
123 TaskTraits& WithSyncPrimitives(); 123 TaskTraits& WithSyncPrimitives();
124 124
125 // DEPRECATED
126 // TODO(fdoray): Remove this as part of crbug.com/675660
127 TaskTraits& WithFileIO();
128
129 // DEPRECATED
130 // TODO(fdoray): Remove this as part of crbug.com/675660
131 TaskTraits& WithWait();
132
133 // Applies |priority| to tasks with these traits. 125 // Applies |priority| to tasks with these traits.
134 TaskTraits& WithPriority(TaskPriority priority); 126 TaskTraits& WithPriority(TaskPriority priority);
135 127
136 // Applies |shutdown_behavior| to tasks with these traits. 128 // Applies |shutdown_behavior| to tasks with these traits.
137 TaskTraits& WithShutdownBehavior(TaskShutdownBehavior shutdown_behavior); 129 TaskTraits& WithShutdownBehavior(TaskShutdownBehavior shutdown_behavior);
138 130
139 // Returns true if tasks with these traits may block. 131 // Returns true if tasks with these traits may block.
140 bool may_block() const { return may_block_; } 132 bool may_block() const { return may_block_; }
141 133
142 // Returns true if tasks with these traits may wait on sync primitives. 134 // Returns true if tasks with these traits may wait on sync primitives.
(...skipping 26 matching lines...) Expand all
169 // DCHECK and EXPECT statements. 161 // DCHECK and EXPECT statements.
170 BASE_EXPORT std::ostream& operator<<(std::ostream& os, 162 BASE_EXPORT std::ostream& operator<<(std::ostream& os,
171 const TaskPriority& shutdown_behavior); 163 const TaskPriority& shutdown_behavior);
172 BASE_EXPORT std::ostream& operator<<( 164 BASE_EXPORT std::ostream& operator<<(
173 std::ostream& os, 165 std::ostream& os,
174 const TaskShutdownBehavior& shutdown_behavior); 166 const TaskShutdownBehavior& shutdown_behavior);
175 167
176 } // namespace base 168 } // namespace base
177 169
178 #endif // BASE_TASK_SCHEDULER_TASK_TRAITS_H_ 170 #endif // BASE_TASK_SCHEDULER_TASK_TRAITS_H_
OLDNEW
« no previous file with comments | « base/task_scheduler/post_task.h ('k') | base/task_scheduler/task_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698