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

Unified Diff: net/ftp/ftp_network_transaction.cc

Issue 11275088: Remove implicit scoped_refptr operator T* Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/dns/serial_worker.h ('k') | net/http/http_network_layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ftp/ftp_network_transaction.cc
diff --git a/net/ftp/ftp_network_transaction.cc b/net/ftp/ftp_network_transaction.cc
index 2c22e386a04428a8185b03be81a052a343713719..acce60f4e2ced463319741e2c83abbf1efd518da 100644
--- a/net/ftp/ftp_network_transaction.cc
+++ b/net/ftp/ftp_network_transaction.cc
@@ -336,7 +336,7 @@ void FtpNetworkTransaction::ResetStateForRestart() {
ctrl_response_buffer_.reset(new FtpCtrlResponseBuffer());
read_data_buf_ = NULL;
read_data_buf_len_ = 0;
- if (write_buf_)
+ if (write_buf_.get())
write_buf_->SetOffset(0);
last_error_ = OK;
data_connection_port_ = 0;
@@ -440,8 +440,8 @@ int FtpNetworkTransaction::SendFtpCommand(const std::string& command,
// which responses are for which command.
DCHECK(!ctrl_response_buffer_->ResponseAvailable());
- DCHECK(!write_command_buf_);
- DCHECK(!write_buf_);
+ DCHECK(!write_command_buf_.get());
+ DCHECK(!write_buf_.get());
if (!IsValidFTPCommandString(command)) {
// Callers should validate the command themselves and return a more specific
@@ -453,7 +453,7 @@ int FtpNetworkTransaction::SendFtpCommand(const std::string& command,
command_sent_ = cmd;
write_command_buf_ = new IOBufferWithSize(command.length() + 2);
- write_buf_ = new DrainableIOBuffer(write_command_buf_,
+ write_buf_ = new DrainableIOBuffer(write_command_buf_.get(),
write_command_buf_->size());
memcpy(write_command_buf_->data(), command.data(), command.length());
memcpy(write_command_buf_->data() + command.length(), kCRLF, 2);
@@ -663,7 +663,7 @@ int FtpNetworkTransaction::DoCtrlConnectComplete(int result) {
int FtpNetworkTransaction::DoCtrlRead() {
next_state_ = STATE_CTRL_READ_COMPLETE;
- return ctrl_socket_->Read(read_ctrl_buf_, kCtrlBufLen, io_callback_);
+ return ctrl_socket_->Read(read_ctrl_buf_.get(), kCtrlBufLen, io_callback_);
}
int FtpNetworkTransaction::DoCtrlReadComplete(int result) {
@@ -694,7 +694,7 @@ int FtpNetworkTransaction::DoCtrlReadComplete(int result) {
int FtpNetworkTransaction::DoCtrlWrite() {
next_state_ = STATE_CTRL_WRITE_COMPLETE;
- return ctrl_socket_->Write(write_buf_,
+ return ctrl_socket_->Write(write_buf_.get(),
write_buf_->BytesRemaining(),
io_callback_);
}
@@ -1246,7 +1246,8 @@ int FtpNetworkTransaction::DoDataRead() {
next_state_ = STATE_DATA_READ_COMPLETE;
read_data_buf_->data()[0] = 0;
- return data_socket_->Read(read_data_buf_, read_data_buf_len_, io_callback_);
+ return data_socket_->
+ Read(read_data_buf_.get(), read_data_buf_len_, io_callback_);
}
int FtpNetworkTransaction::DoDataReadComplete(int result) {
« no previous file with comments | « net/dns/serial_worker.h ('k') | net/http/http_network_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698