diff options
author | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-02 21:13:46 +0000 |
---|---|---|
committer | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-02 21:13:46 +0000 |
commit | fc72bb18b111ff63e57135d97de6d59291f3b7b8 (patch) | |
tree | f7fedf0a0577e38a0486e8bdc88a47a508bf122d /content/browser/renderer_host/pepper | |
parent | 7cd76fded67d66fb8ea4f5abce5241ad71d749a9 (diff) | |
download | chromium_src-fc72bb18b111ff63e57135d97de6d59291f3b7b8.zip chromium_src-fc72bb18b111ff63e57135d97de6d59291f3b7b8.tar.gz chromium_src-fc72bb18b111ff63e57135d97de6d59291f3b7b8.tar.bz2 |
Update content/ to use scoped_refptr<T>::get() rather than implicit "operator T*"
Linux fixes
BUG=110610
TBR=darin
Review URL: https://chromiumcodereview.appspot.com/16294003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203624 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/renderer_host/pepper')
-rw-r--r-- | content/browser/renderer_host/pepper/pepper_tcp_socket.cc | 25 | ||||
-rw-r--r-- | content/browser/renderer_host/pepper/pepper_udp_socket_private_message_filter.cc | 18 |
2 files changed, 26 insertions, 17 deletions
diff --git a/content/browser/renderer_host/pepper/pepper_tcp_socket.cc b/content/browser/renderer_host/pepper/pepper_tcp_socket.cc index 3638898..a911c2c 100644 --- a/content/browser/renderer_host/pepper/pepper_tcp_socket.cc +++ b/content/browser/renderer_host/pepper/pepper_tcp_socket.cc @@ -168,9 +168,10 @@ void PepperTCPSocket::Read(int32 bytes_to_read) { } read_buffer_ = new net::IOBuffer(bytes_to_read); - int result = socket_->Read(read_buffer_, bytes_to_read, - base::Bind(&PepperTCPSocket::OnReadCompleted, - base::Unretained(this))); + int result = socket_->Read( + read_buffer_.get(), + bytes_to_read, + base::Bind(&PepperTCPSocket::OnReadCompleted, base::Unretained(this))); if (result != net::ERR_IO_PENDING) OnReadCompleted(result); } @@ -192,7 +193,8 @@ void PepperTCPSocket::Write(const std::string& data) { write_buffer_base_ = new net::IOBuffer(data_size); memcpy(write_buffer_base_->data(), data.data(), data_size); - write_buffer_ = new net::DrainableIOBuffer(write_buffer_base_, data_size); + write_buffer_ = + new net::DrainableIOBuffer(write_buffer_base_.get(), data_size); DoWrite(); } @@ -291,9 +293,9 @@ bool PepperTCPSocket::GetCertificateFields( ppapi::PPB_X509Certificate_Fields* fields) { scoped_refptr<net::X509Certificate> cert = net::X509Certificate::CreateFromBytes(der, length); - if (!cert) + if (!cert.get()) return false; - return GetCertificateFields(*cert, fields); + return GetCertificateFields(*cert.get(), fields); } void PepperTCPSocket::SendReadACKError() { @@ -314,8 +316,8 @@ void PepperTCPSocket::SendSSLHandshakeACK(bool succeeded) { static_cast<net::SSLClientSocket*>(socket_.get()); net::SSLInfo ssl_info; ssl_socket->GetSSLInfo(&ssl_info); - if (ssl_info.cert) - GetCertificateFields(*ssl_info.cert, &certificate_fields); + if (ssl_info.cert.get()) + GetCertificateFields(*ssl_info.cert.get(), &certificate_fields); } manager_->Send(new PpapiMsg_PPBTCPSocket_SSLHandshakeACK( routing_id_, @@ -443,9 +445,10 @@ void PepperTCPSocket::DoWrite() { DCHECK(write_buffer_.get()); DCHECK_GT(write_buffer_->BytesRemaining(), 0); - int result = socket_->Write(write_buffer_, write_buffer_->BytesRemaining(), - base::Bind(&PepperTCPSocket::OnWriteCompleted, - base::Unretained(this))); + int result = socket_->Write( + write_buffer_.get(), + write_buffer_->BytesRemaining(), + base::Bind(&PepperTCPSocket::OnWriteCompleted, base::Unretained(this))); if (result != net::ERR_IO_PENDING) OnWriteCompleted(result); } diff --git a/content/browser/renderer_host/pepper/pepper_udp_socket_private_message_filter.cc b/content/browser/renderer_host/pepper/pepper_udp_socket_private_message_filter.cc index e6563cf..9095710 100644 --- a/content/browser/renderer_host/pepper/pepper_udp_socket_private_message_filter.cc +++ b/content/browser/renderer_host/pepper/pepper_udp_socket_private_message_filter.cc @@ -165,7 +165,7 @@ int32_t PepperUDPSocketPrivateMessageFilter::OnMsgRecvFrom( if (closed_) return PP_ERROR_FAILED; - if (recvfrom_buffer_) + if (recvfrom_buffer_.get()) return PP_ERROR_INPROGRESS; if (num_bytes > ppapi::proxy::UDPSocketPrivateResource::kMaxReadSize) { // |num_bytes| value is checked on the plugin side. @@ -174,9 +174,12 @@ int32_t PepperUDPSocketPrivateMessageFilter::OnMsgRecvFrom( } recvfrom_buffer_ = new net::IOBuffer(num_bytes); int result = socket_->RecvFrom( - recvfrom_buffer_, num_bytes, &recvfrom_address_, + recvfrom_buffer_.get(), + num_bytes, + &recvfrom_address_, base::Bind(&PepperUDPSocketPrivateMessageFilter::OnRecvFromCompleted, - this, context->MakeReplyMessageContext())); + this, + context->MakeReplyMessageContext())); if (result != net::ERR_IO_PENDING) OnRecvFromCompleted(context->MakeReplyMessageContext(), result); return PP_OK_COMPLETIONPENDING; @@ -263,7 +266,7 @@ void PepperUDPSocketPrivateMessageFilter::DoSendTo( return; } - if (sendto_buffer_) { + if (sendto_buffer_.get()) { SendSendToError(context, PP_ERROR_INPROGRESS); return; } @@ -292,8 +295,11 @@ void PepperUDPSocketPrivateMessageFilter::DoSendTo( } int result = socket_->SendTo( - sendto_buffer_, sendto_buffer_->size(), net::IPEndPoint(address, port), - base::Bind(&PepperUDPSocketPrivateMessageFilter::OnSendToCompleted, this, + sendto_buffer_.get(), + sendto_buffer_->size(), + net::IPEndPoint(address, port), + base::Bind(&PepperUDPSocketPrivateMessageFilter::OnSendToCompleted, + this, context)); if (result != net::ERR_IO_PENDING) OnSendToCompleted(context, result); |