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

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

Issue 2829083002: Add constexpr TaskTraits constructor. (Closed)
Patch Set: remove-comma 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_traits.h ('k') | base/task_scheduler/task_traits_details.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 #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
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
OLDNEW
« no previous file with comments | « base/task_scheduler/task_traits.h ('k') | base/task_scheduler/task_traits_details.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698