| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "mojo/edk/system/data_pipe_consumer_dispatcher.h" | 5 #include "mojo/edk/system/data_pipe_consumer_dispatcher.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "mojo/edk/system/data_pipe.h" | 10 #include "mojo/edk/system/data_pipe.h" |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 | 188 |
| 189 HandleSignalsState DataPipeConsumerDispatcher::GetHandleSignalsStateImplNoLock() | 189 HandleSignalsState DataPipeConsumerDispatcher::GetHandleSignalsStateImplNoLock() |
| 190 const { | 190 const { |
| 191 mutex().AssertHeld(); | 191 mutex().AssertHeld(); |
| 192 return data_pipe_->ConsumerGetHandleSignalsState(); | 192 return data_pipe_->ConsumerGetHandleSignalsState(); |
| 193 } | 193 } |
| 194 | 194 |
| 195 MojoResult DataPipeConsumerDispatcher::AddAwakableImplNoLock( | 195 MojoResult DataPipeConsumerDispatcher::AddAwakableImplNoLock( |
| 196 Awakable* awakable, | 196 Awakable* awakable, |
| 197 MojoHandleSignals signals, | 197 MojoHandleSignals signals, |
| 198 bool force, |
| 198 uint64_t context, | 199 uint64_t context, |
| 199 HandleSignalsState* signals_state) { | 200 HandleSignalsState* signals_state) { |
| 200 mutex().AssertHeld(); | 201 mutex().AssertHeld(); |
| 201 return data_pipe_->ConsumerAddAwakable(awakable, signals, context, | 202 return data_pipe_->ConsumerAddAwakable(awakable, signals, force, context, |
| 202 signals_state); | 203 signals_state); |
| 203 } | 204 } |
| 204 | 205 |
| 205 void DataPipeConsumerDispatcher::RemoveAwakableImplNoLock( | 206 void DataPipeConsumerDispatcher::RemoveAwakableImplNoLock( |
| 206 Awakable* awakable, | 207 Awakable* awakable, |
| 207 HandleSignalsState* signals_state) { | 208 HandleSignalsState* signals_state) { |
| 208 mutex().AssertHeld(); | 209 mutex().AssertHeld(); |
| 209 data_pipe_->ConsumerRemoveAwakable(awakable, signals_state); | 210 data_pipe_->ConsumerRemoveAwakable(awakable, signals_state); |
| 210 } | 211 } |
| 211 | 212 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 225 AssertHasOneRef(); // Only one ref => no need to take the lock. | 226 AssertHasOneRef(); // Only one ref => no need to take the lock. |
| 226 | 227 |
| 227 bool rv = data_pipe_->ConsumerEndSerialize(channel, destination, actual_size, | 228 bool rv = data_pipe_->ConsumerEndSerialize(channel, destination, actual_size, |
| 228 platform_handles); | 229 platform_handles); |
| 229 data_pipe_ = nullptr; | 230 data_pipe_ = nullptr; |
| 230 return rv; | 231 return rv; |
| 231 } | 232 } |
| 232 | 233 |
| 233 } // namespace system | 234 } // namespace system |
| 234 } // namespace mojo | 235 } // namespace mojo |
| OLD | NEW |