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

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

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/task_traits.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_traits.h" 5 #include "base/task_scheduler/task_traits.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <ostream> 9 #include <ostream>
10 10
(...skipping 16 matching lines...) Expand all
27 TaskTraits& TaskTraits::MayBlock() { 27 TaskTraits& TaskTraits::MayBlock() {
28 may_block_ = true; 28 may_block_ = true;
29 return *this; 29 return *this;
30 } 30 }
31 31
32 TaskTraits& TaskTraits::WithSyncPrimitives() { 32 TaskTraits& TaskTraits::WithSyncPrimitives() {
33 with_sync_primitives_ = true; 33 with_sync_primitives_ = true;
34 return *this; 34 return *this;
35 } 35 }
36 36
37 TaskTraits& TaskTraits::WithFileIO() {
38 return MayBlock();
39 }
40
41 TaskTraits& TaskTraits::WithWait() {
42 return MayBlock().WithSyncPrimitives();
43 }
44
45 TaskTraits& TaskTraits::WithPriority(TaskPriority priority) { 37 TaskTraits& TaskTraits::WithPriority(TaskPriority priority) {
46 priority_ = priority; 38 priority_ = priority;
47 return *this; 39 return *this;
48 } 40 }
49 41
50 TaskTraits& TaskTraits::WithShutdownBehavior( 42 TaskTraits& TaskTraits::WithShutdownBehavior(
51 TaskShutdownBehavior shutdown_behavior) { 43 TaskShutdownBehavior shutdown_behavior) {
52 shutdown_behavior_ = shutdown_behavior; 44 shutdown_behavior_ = shutdown_behavior;
53 return *this; 45 return *this;
54 } 46 }
(...skipping 30 matching lines...) Expand all
85 return os; 77 return os;
86 } 78 }
87 79
88 std::ostream& operator<<(std::ostream& os, 80 std::ostream& operator<<(std::ostream& os,
89 const TaskShutdownBehavior& shutdown_behavior) { 81 const TaskShutdownBehavior& shutdown_behavior) {
90 os << TaskShutdownBehaviorToString(shutdown_behavior); 82 os << TaskShutdownBehaviorToString(shutdown_behavior);
91 return os; 83 return os;
92 } 84 }
93 85
94 } // namespace base 86 } // namespace base
OLDNEW
« no previous file with comments | « base/task_scheduler/task_traits.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698