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

Unified Diff: net/socket/tcp_socket_win.cc

Issue 724553002: Remove implicit conversions from scoped_refptr to T* in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/socket/ssl_client_socket_nss.cc ('k') | net/udp/udp_socket_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/tcp_socket_win.cc
diff --git a/net/socket/tcp_socket_win.cc b/net/socket/tcp_socket_win.cc
index d5565ad669c4ecb2bb4aa7fa2504e2f1e303f258..fd3c8b7bce678375d1a72247d33621faf70ff6fa 100644
--- a/net/socket/tcp_socket_win.cc
+++ b/net/socket/tcp_socket_win.cc
@@ -324,7 +324,7 @@ int TCPSocketWin::AdoptConnectedSocket(SOCKET socket,
const IPEndPoint& peer_address) {
DCHECK(CalledOnValidThread());
DCHECK_EQ(socket_, INVALID_SOCKET);
- DCHECK(!core_);
+ DCHECK(!core_.get());
socket_ = socket;
@@ -436,7 +436,7 @@ int TCPSocketWin::Connect(const IPEndPoint& address,
// again after a connection attempt failed on Windows, it results in
// unspecified behavior according to POSIX. Therefore, we make it behave in
// the same way as TCPSocketLibevent.
- DCHECK(!peer_address_ && !core_);
+ DCHECK(!peer_address_ && !core_.get());
if (!logging_multiple_connect_attempts_)
LogConnectBegin(AddressList(address));
@@ -504,7 +504,7 @@ int TCPSocketWin::Read(IOBuffer* buf,
DCHECK_NE(socket_, INVALID_SOCKET);
DCHECK(!waiting_read_);
CHECK(read_callback_.is_null());
- DCHECK(!core_->read_iobuffer_);
+ DCHECK(!core_->read_iobuffer_.get());
return DoRead(buf, buf_len, callback);
}
@@ -517,7 +517,7 @@ int TCPSocketWin::Write(IOBuffer* buf,
DCHECK(!waiting_write_);
CHECK(write_callback_.is_null());
DCHECK_GT(buf_len, 0);
- DCHECK(!core_->write_iobuffer_);
+ DCHECK(!core_->write_iobuffer_.get());
base::StatsCounter writes("tcp.writes");
writes.Increment();
@@ -689,7 +689,7 @@ void TCPSocketWin::Close() {
accept_event_ = WSA_INVALID_EVENT;
}
- if (core_) {
+ if (core_.get()) {
if (waiting_connect_) {
// We closed the socket, so this notification will never come.
// From MSDN' WSAEventSelect documentation:
@@ -796,7 +796,7 @@ void TCPSocketWin::OnObjectSignaled(HANDLE object) {
int TCPSocketWin::DoConnect() {
DCHECK_EQ(connect_os_error_, 0);
- DCHECK(!core_);
+ DCHECK(!core_.get());
net_log_.BeginEvent(NetLog::TYPE_TCP_CONNECT_ATTEMPT,
CreateNetLogIPEndPointCallback(peer_address_.get()));
@@ -1018,7 +1018,7 @@ void TCPSocketWin::DidSignalRead() {
// DoRead() because recv() reports a more accurate error code
// (WSAECONNRESET vs. WSAECONNABORTED) when the connection was
// reset.
- rv = DoRead(core_->read_iobuffer_, core_->read_buffer_length_,
+ rv = DoRead(core_->read_iobuffer_.get(), core_->read_buffer_length_,
read_callback_);
if (rv == ERR_IO_PENDING)
return;
« no previous file with comments | « net/socket/ssl_client_socket_nss.cc ('k') | net/udp/udp_socket_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698