| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "net/ftp/ftp_network_transaction.h" | 5 #include "net/ftp/ftp_network_transaction.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 if (command_sent_ == COMMAND_QUIT) | 231 if (command_sent_ == COMMAND_QUIT) |
| 232 return error; | 232 return error; |
| 233 | 233 |
| 234 next_state_ = STATE_CTRL_WRITE_QUIT; | 234 next_state_ = STATE_CTRL_WRITE_QUIT; |
| 235 last_error_ = error; | 235 last_error_ = error; |
| 236 return OK; | 236 return OK; |
| 237 } | 237 } |
| 238 | 238 |
| 239 int FtpNetworkTransaction::Start(const FtpRequestInfo* request_info, | 239 int FtpNetworkTransaction::Start(const FtpRequestInfo* request_info, |
| 240 const CompletionCallback& callback, | 240 const CompletionCallback& callback, |
| 241 const BoundNetLog& net_log) { | 241 const NetLogWithSource& net_log) { |
| 242 net_log_ = net_log; | 242 net_log_ = net_log; |
| 243 request_ = request_info; | 243 request_ = request_info; |
| 244 | 244 |
| 245 ctrl_response_buffer_.reset(new FtpCtrlResponseBuffer(net_log_)); | 245 ctrl_response_buffer_.reset(new FtpCtrlResponseBuffer(net_log_)); |
| 246 | 246 |
| 247 if (request_->url.has_username()) { | 247 if (request_->url.has_username()) { |
| 248 base::string16 username; | 248 base::string16 username; |
| 249 base::string16 password; | 249 base::string16 password; |
| 250 GetIdentityFromURL(request_->url, &username, &password); | 250 GetIdentityFromURL(request_->url, &username, &password); |
| 251 credentials_.Set(username, password); | 251 credentials_.Set(username, password); |
| (...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1371 if (!had_error_type[type]) { | 1371 if (!had_error_type[type]) { |
| 1372 had_error_type[type] = true; | 1372 had_error_type[type] = true; |
| 1373 UMA_HISTOGRAM_ENUMERATION("Net.FtpDataConnectionErrorHappened", | 1373 UMA_HISTOGRAM_ENUMERATION("Net.FtpDataConnectionErrorHappened", |
| 1374 type, NUM_OF_NET_ERROR_TYPES); | 1374 type, NUM_OF_NET_ERROR_TYPES); |
| 1375 } | 1375 } |
| 1376 UMA_HISTOGRAM_ENUMERATION("Net.FtpDataConnectionErrorCount", | 1376 UMA_HISTOGRAM_ENUMERATION("Net.FtpDataConnectionErrorCount", |
| 1377 type, NUM_OF_NET_ERROR_TYPES); | 1377 type, NUM_OF_NET_ERROR_TYPES); |
| 1378 } | 1378 } |
| 1379 | 1379 |
| 1380 } // namespace net | 1380 } // namespace net |
| OLD | NEW |