| 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 uint32_t context, | 198 uint64_t context, |
| 199 HandleSignalsState* signals_state) { | 199 HandleSignalsState* signals_state) { |
| 200 mutex().AssertHeld(); | 200 mutex().AssertHeld(); |
| 201 return data_pipe_->ConsumerAddAwakable(awakable, signals, context, | 201 return data_pipe_->ConsumerAddAwakable(awakable, signals, context, |
| 202 signals_state); | 202 signals_state); |
| 203 } | 203 } |
| 204 | 204 |
| 205 void DataPipeConsumerDispatcher::RemoveAwakableImplNoLock( | 205 void DataPipeConsumerDispatcher::RemoveAwakableImplNoLock( |
| 206 Awakable* awakable, | 206 Awakable* awakable, |
| 207 HandleSignalsState* signals_state) { | 207 HandleSignalsState* signals_state) { |
| 208 mutex().AssertHeld(); | 208 mutex().AssertHeld(); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 225 AssertHasOneRef(); // Only one ref => no need to take the lock. | 225 AssertHasOneRef(); // Only one ref => no need to take the lock. |
| 226 | 226 |
| 227 bool rv = data_pipe_->ConsumerEndSerialize(channel, destination, actual_size, | 227 bool rv = data_pipe_->ConsumerEndSerialize(channel, destination, actual_size, |
| 228 platform_handles); | 228 platform_handles); |
| 229 data_pipe_ = nullptr; | 229 data_pipe_ = nullptr; |
| 230 return rv; | 230 return rv; |
| 231 } | 231 } |
| 232 | 232 |
| 233 } // namespace system | 233 } // namespace system |
| 234 } // namespace mojo | 234 } // namespace mojo |
| OLD | NEW |