OLD | NEW |
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 |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 | 12 |
13 namespace base { | 13 namespace base { |
14 | 14 |
15 TaskTraits::TaskTraits() = default; | |
16 TaskTraits::~TaskTraits() = default; | |
17 | |
18 TaskTraits& TaskTraits::MayBlock() { | 15 TaskTraits& TaskTraits::MayBlock() { |
19 may_block_ = true; | 16 may_block_ = true; |
20 return *this; | 17 return *this; |
21 } | 18 } |
22 | 19 |
23 TaskTraits& TaskTraits::WithBaseSyncPrimitives() { | 20 TaskTraits& TaskTraits::WithBaseSyncPrimitives() { |
24 with_base_sync_primitives_ = true; | 21 with_base_sync_primitives_ = true; |
25 return *this; | 22 return *this; |
26 } | 23 } |
27 | 24 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 return os; | 66 return os; |
70 } | 67 } |
71 | 68 |
72 std::ostream& operator<<(std::ostream& os, | 69 std::ostream& operator<<(std::ostream& os, |
73 const TaskShutdownBehavior& shutdown_behavior) { | 70 const TaskShutdownBehavior& shutdown_behavior) { |
74 os << TaskShutdownBehaviorToString(shutdown_behavior); | 71 os << TaskShutdownBehaviorToString(shutdown_behavior); |
75 return os; | 72 return os; |
76 } | 73 } |
77 | 74 |
78 } // namespace base | 75 } // namespace base |
OLD | NEW |