OLD | NEW |
---|---|
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. Use of this |
2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
3 // LICENSE file. | 3 // LICENSE file. |
4 | 4 |
5 #include "net/ftp/ftp_network_transaction.h" | 5 #include "net/ftp/ftp_network_transaction.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "net/base/connection_type_histograms.h" | 9 #include "net/base/connection_type_histograms.h" |
10 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
(...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
906 DCHECK(read_data_buf_); | 906 DCHECK(read_data_buf_); |
907 DCHECK(read_data_buf_len_ > 0); | 907 DCHECK(read_data_buf_len_ > 0); |
908 | 908 |
909 next_state_ = STATE_DATA_READ_COMPLETE; | 909 next_state_ = STATE_DATA_READ_COMPLETE; |
910 read_data_buf_->data()[0] = 0; | 910 read_data_buf_->data()[0] = 0; |
911 return data_socket_->Read(read_data_buf_, read_data_buf_len_, | 911 return data_socket_->Read(read_data_buf_, read_data_buf_len_, |
912 &io_callback_); | 912 &io_callback_); |
913 } | 913 } |
914 | 914 |
915 int FtpNetworkTransaction::DoDataReadComplete(int result) { | 915 int FtpNetworkTransaction::DoDataReadComplete(int result) { |
916 DLOG(INFO) << read_data_buf_->data(); // The read_data_buf_ is NULL | 916 DLOG(INFO) << std::string(read_data_buf_->data(), result); |
wtc
2009/07/30 18:02:32
This should be protected with if (result > 0).
Bu
| |
917 // terminated string. | |
918 return result; | 917 return result; |
919 } | 918 } |
920 | 919 |
921 } // namespace net | 920 } // namespace net |
OLD | NEW |