| 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" |
| 11 #include "mojo/edk/system/memory.h" | 11 #include "mojo/edk/system/memory.h" |
| 12 | 12 |
| 13 using mojo::util::MutexLocker; |
| 13 using mojo::util::RefPtr; | 14 using mojo::util::RefPtr; |
| 14 | 15 |
| 15 namespace mojo { | 16 namespace mojo { |
| 16 namespace system { | 17 namespace system { |
| 17 | 18 |
| 18 void DataPipeConsumerDispatcher::Init(RefPtr<DataPipe>&& data_pipe) { | 19 void DataPipeConsumerDispatcher::Init(RefPtr<DataPipe>&& data_pipe) { |
| 19 DCHECK(data_pipe); | 20 DCHECK(data_pipe); |
| 20 data_pipe_ = std::move(data_pipe); | 21 data_pipe_ = std::move(data_pipe); |
| 21 } | 22 } |
| 22 | 23 |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 return rv; | 170 return rv; |
| 170 } | 171 } |
| 171 | 172 |
| 172 bool DataPipeConsumerDispatcher::IsBusyNoLock() const { | 173 bool DataPipeConsumerDispatcher::IsBusyNoLock() const { |
| 173 mutex().AssertHeld(); | 174 mutex().AssertHeld(); |
| 174 return data_pipe_->ConsumerIsBusy(); | 175 return data_pipe_->ConsumerIsBusy(); |
| 175 } | 176 } |
| 176 | 177 |
| 177 } // namespace system | 178 } // namespace system |
| 178 } // namespace mojo | 179 } // namespace mojo |
| OLD | NEW |