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 #ifndef MOJO_EDK_SYSTEM_REQUEST_CONTEXT_H_ | 5 #ifndef MOJO_EDK_SYSTEM_REQUEST_CONTEXT_H_ |
6 #define MOJO_EDK_SYSTEM_REQUEST_CONTEXT_H_ | 6 #define MOJO_EDK_SYSTEM_REQUEST_CONTEXT_H_ |
7 | 7 |
8 #include "base/containers/stack_container.h" | 8 #include "base/containers/stack_container.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "mojo/edk/system/handle_signals_state.h" | 10 #include "mojo/edk/system/handle_signals_state.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 void AddWatchCancelFinalizer(scoped_refptr<Watcher> watcher); | 60 void AddWatchCancelFinalizer(scoped_refptr<Watcher> watcher); |
61 | 61 |
62 private: | 62 private: |
63 // Is this request context the current one? | 63 // Is this request context the current one? |
64 bool IsCurrent() const; | 64 bool IsCurrent() const; |
65 | 65 |
66 struct WatchNotifyFinalizer { | 66 struct WatchNotifyFinalizer { |
67 WatchNotifyFinalizer(scoped_refptr<Watcher> watcher, | 67 WatchNotifyFinalizer(scoped_refptr<Watcher> watcher, |
68 MojoResult result, | 68 MojoResult result, |
69 const HandleSignalsState& state); | 69 const HandleSignalsState& state); |
| 70 WatchNotifyFinalizer(const WatchNotifyFinalizer& other); |
70 ~WatchNotifyFinalizer(); | 71 ~WatchNotifyFinalizer(); |
71 | 72 |
72 scoped_refptr<Watcher> watcher; | 73 scoped_refptr<Watcher> watcher; |
73 MojoResult result; | 74 MojoResult result; |
74 HandleSignalsState state; | 75 HandleSignalsState state; |
75 }; | 76 }; |
76 | 77 |
77 // Chosen by fair dice roll. | 78 // Chosen by fair dice roll. |
78 // | 79 // |
79 // TODO: We should measure the distribution of # of finalizers typical to | 80 // TODO: We should measure the distribution of # of finalizers typical to |
(...skipping 16 matching lines...) Expand all Loading... |
96 // the rest of this class and its usages. | 97 // the rest of this class and its usages. |
97 base::ThreadLocalPointer<RequestContext>* tls_context_; | 98 base::ThreadLocalPointer<RequestContext>* tls_context_; |
98 | 99 |
99 DISALLOW_COPY_AND_ASSIGN(RequestContext); | 100 DISALLOW_COPY_AND_ASSIGN(RequestContext); |
100 }; | 101 }; |
101 | 102 |
102 } // namespace edk | 103 } // namespace edk |
103 } // namespace mojo | 104 } // namespace mojo |
104 | 105 |
105 #endif // MOJO_EDK_SYSTEM_REQUEST_CONTEXT_H_ | 106 #endif // MOJO_EDK_SYSTEM_REQUEST_CONTEXT_H_ |
OLD | NEW |