| 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_producer_dispatcher.h" | 5 #include "mojo/edk/system/data_pipe_producer_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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 size_t* actual_size, | 198 size_t* actual_size, |
| 199 std::vector<ScopedPlatformHandle>* platform_handles) { | 199 std::vector<ScopedPlatformHandle>* platform_handles) { |
| 200 AssertHasOneRef(); // Only one ref => no need to take the lock. | 200 AssertHasOneRef(); // Only one ref => no need to take the lock. |
| 201 | 201 |
| 202 bool rv = data_pipe_->ProducerEndSerialize(channel, destination, actual_size, | 202 bool rv = data_pipe_->ProducerEndSerialize(channel, destination, actual_size, |
| 203 platform_handles); | 203 platform_handles); |
| 204 data_pipe_ = nullptr; | 204 data_pipe_ = nullptr; |
| 205 return rv; | 205 return rv; |
| 206 } | 206 } |
| 207 | 207 |
| 208 bool DataPipeProducerDispatcher::IsBusyNoLock() const { | |
| 209 mutex().AssertHeld(); | |
| 210 return data_pipe_->ProducerIsBusy(); | |
| 211 } | |
| 212 | |
| 213 } // namespace system | 208 } // namespace system |
| 214 } // namespace mojo | 209 } // namespace mojo |
| OLD | NEW |