Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(629)

Side by Side Diff: mojo/edk/system/data_pipe_consumer_dispatcher.cc

Issue 1423713009: EDK: Move ref counting classes to mojo/edk/util. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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::RefPtr;
14
13 namespace mojo { 15 namespace mojo {
14 namespace system { 16 namespace system {
15 17
16 void DataPipeConsumerDispatcher::Init(RefPtr<DataPipe>&& data_pipe) { 18 void DataPipeConsumerDispatcher::Init(RefPtr<DataPipe>&& data_pipe) {
17 DCHECK(data_pipe); 19 DCHECK(data_pipe);
18 data_pipe_ = std::move(data_pipe); 20 data_pipe_ = std::move(data_pipe);
19 } 21 }
20 22
21 Dispatcher::Type DataPipeConsumerDispatcher::GetType() const { 23 Dispatcher::Type DataPipeConsumerDispatcher::GetType() const {
22 return Type::DATA_PIPE_CONSUMER; 24 return Type::DATA_PIPE_CONSUMER;
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 return rv; 169 return rv;
168 } 170 }
169 171
170 bool DataPipeConsumerDispatcher::IsBusyNoLock() const { 172 bool DataPipeConsumerDispatcher::IsBusyNoLock() const {
171 mutex().AssertHeld(); 173 mutex().AssertHeld();
172 return data_pipe_->ConsumerIsBusy(); 174 return data_pipe_->ConsumerIsBusy();
173 } 175 }
174 176
175 } // namespace system 177 } // namespace system
176 } // namespace mojo 178 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/data_pipe_consumer_dispatcher.h ('k') | mojo/edk/system/data_pipe_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698