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

Side by Side Diff: remoting/protocol/channel_socket_adapter.cc

Issue 2890833002: Adding ThreadChecker validation to d'tors for protocol classes (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « remoting/protocol/capture_scheduler.cc ('k') | remoting/protocol/ice_connection_to_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "remoting/protocol/channel_socket_adapter.h" 5 #include "remoting/protocol/channel_socket_adapter.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 10 matching lines...) Expand all
21 21
22 channel_->SignalReadPacket.connect( 22 channel_->SignalReadPacket.connect(
23 this, &TransportChannelSocketAdapter::OnNewPacket); 23 this, &TransportChannelSocketAdapter::OnNewPacket);
24 channel_->SignalWritableState.connect( 24 channel_->SignalWritableState.connect(
25 this, &TransportChannelSocketAdapter::OnWritableState); 25 this, &TransportChannelSocketAdapter::OnWritableState);
26 channel_->SignalDestroyed.connect( 26 channel_->SignalDestroyed.connect(
27 this, &TransportChannelSocketAdapter::OnChannelDestroyed); 27 this, &TransportChannelSocketAdapter::OnChannelDestroyed);
28 } 28 }
29 29
30 TransportChannelSocketAdapter::~TransportChannelSocketAdapter() { 30 TransportChannelSocketAdapter::~TransportChannelSocketAdapter() {
31 DCHECK(thread_checker_.CalledOnValidThread());
31 if (!destruction_callback_.is_null()) 32 if (!destruction_callback_.is_null())
32 destruction_callback_.Run(); 33 destruction_callback_.Run();
33 } 34 }
34 35
35 void TransportChannelSocketAdapter::SetOnDestroyedCallback( 36 void TransportChannelSocketAdapter::SetOnDestroyedCallback(
36 const base::Closure& callback) { 37 const base::Closure& callback) {
37 destruction_callback_ = callback; 38 destruction_callback_ = callback;
38 } 39 }
39 40
40 int TransportChannelSocketAdapter::Recv( 41 int TransportChannelSocketAdapter::Recv(
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 176
176 void TransportChannelSocketAdapter::OnChannelDestroyed( 177 void TransportChannelSocketAdapter::OnChannelDestroyed(
177 cricket::IceTransportInternal* channel) { 178 cricket::IceTransportInternal* channel) {
178 DCHECK(thread_checker_.CalledOnValidThread()); 179 DCHECK(thread_checker_.CalledOnValidThread());
179 DCHECK_EQ(channel, channel_); 180 DCHECK_EQ(channel, channel_);
180 Close(net::ERR_CONNECTION_ABORTED); 181 Close(net::ERR_CONNECTION_ABORTED);
181 } 182 }
182 183
183 } // namespace protocol 184 } // namespace protocol
184 } // namespace remoting 185 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/capture_scheduler.cc ('k') | remoting/protocol/ice_connection_to_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698