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

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

Issue 502573006: Remove implicit conversions from scoped_refptr to T* in mojo/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months 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/system/data_pipe_consumer_dispatcher.h" 5 #include "mojo/system/data_pipe_consumer_dispatcher.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "mojo/system/data_pipe.h" 8 #include "mojo/system/data_pipe.h"
9 #include "mojo/system/memory.h" 9 #include "mojo/system/memory.h"
10 10
11 namespace mojo { 11 namespace mojo {
12 namespace system { 12 namespace system {
13 13
14 DataPipeConsumerDispatcher::DataPipeConsumerDispatcher() { 14 DataPipeConsumerDispatcher::DataPipeConsumerDispatcher() {
15 } 15 }
16 16
17 void DataPipeConsumerDispatcher::Init(scoped_refptr<DataPipe> data_pipe) { 17 void DataPipeConsumerDispatcher::Init(scoped_refptr<DataPipe> data_pipe) {
18 DCHECK(data_pipe); 18 DCHECK(data_pipe.get());
19 data_pipe_ = data_pipe; 19 data_pipe_ = data_pipe;
20 } 20 }
21 21
22 Dispatcher::Type DataPipeConsumerDispatcher::GetType() const { 22 Dispatcher::Type DataPipeConsumerDispatcher::GetType() const {
23 return kTypeDataPipeConsumer; 23 return kTypeDataPipeConsumer;
24 } 24 }
25 25
26 DataPipeConsumerDispatcher::~DataPipeConsumerDispatcher() { 26 DataPipeConsumerDispatcher::~DataPipeConsumerDispatcher() {
27 // |Close()|/|CloseImplNoLock()| should have taken care of the pipe. 27 // |Close()|/|CloseImplNoLock()| should have taken care of the pipe.
28 DCHECK(!data_pipe_); 28 DCHECK(!data_pipe_.get());
29 } 29 }
30 30
31 void DataPipeConsumerDispatcher::CancelAllWaitersNoLock() { 31 void DataPipeConsumerDispatcher::CancelAllWaitersNoLock() {
32 lock().AssertAcquired(); 32 lock().AssertAcquired();
33 data_pipe_->ConsumerCancelAllWaiters(); 33 data_pipe_->ConsumerCancelAllWaiters();
34 } 34 }
35 35
36 void DataPipeConsumerDispatcher::CloseImplNoLock() { 36 void DataPipeConsumerDispatcher::CloseImplNoLock() {
37 lock().AssertAcquired(); 37 lock().AssertAcquired();
38 data_pipe_->ConsumerClose(); 38 data_pipe_->ConsumerClose();
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 data_pipe_->ConsumerRemoveWaiter(waiter, signals_state); 121 data_pipe_->ConsumerRemoveWaiter(waiter, signals_state);
122 } 122 }
123 123
124 bool DataPipeConsumerDispatcher::IsBusyNoLock() const { 124 bool DataPipeConsumerDispatcher::IsBusyNoLock() const {
125 lock().AssertAcquired(); 125 lock().AssertAcquired();
126 return data_pipe_->ConsumerIsBusy(); 126 return data_pipe_->ConsumerIsBusy();
127 } 127 }
128 128
129 } // namespace system 129 } // namespace system
130 } // namespace mojo 130 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698