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/url_request/url_request_ftp_job.h" | 5 #include "net/url_request/url_request_ftp_job.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "net/base/auth.h" | 10 #include "net/base/auth.h" |
11 #include "net/base/host_port_pair.h" | 11 #include "net/base/host_port_pair.h" |
12 #include "net/base/net_errors.h" | 12 #include "net/base/net_errors.h" |
13 #include "net/base/net_util.h" | 13 #include "net/base/net_util.h" |
14 #include "net/ftp/ftp_response_info.h" | 14 #include "net/ftp/ftp_response_info.h" |
15 #include "net/ftp/ftp_transaction_factory.h" | 15 #include "net/ftp/ftp_transaction_factory.h" |
16 #include "net/url_request/url_request.h" | 16 #include "net/url_request/url_request.h" |
17 #include "net/url_request/url_request_context.h" | 17 #include "net/url_request/url_request_context.h" |
18 #include "net/url_request/url_request_error_job.h" | 18 #include "net/url_request/url_request_error_job.h" |
19 | 19 |
20 namespace net { | 20 namespace net { |
21 | 21 |
22 URLRequestFtpJob::URLRequestFtpJob(URLRequest* request) | 22 URLRequestFtpJob::URLRequestFtpJob(URLRequest* request) |
23 : URLRequestJob(request), | 23 : URLRequestJob(request, request->context()->network_delegate()), |
24 read_in_progress_(false), | 24 read_in_progress_(false), |
25 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { | 25 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { |
26 } | 26 } |
27 | 27 |
28 // static | 28 // static |
29 URLRequestJob* URLRequestFtpJob::Factory(URLRequest* request, | 29 URLRequestJob* URLRequestFtpJob::Factory(URLRequest* request, |
30 const std::string& scheme) { | 30 const std::string& scheme) { |
31 DCHECK_EQ(scheme, "ftp"); | 31 DCHECK_EQ(scheme, "ftp"); |
32 | 32 |
33 int port = request->url().IntPort(); | 33 int port = request->url().IntPort(); |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 if (rv == ERR_IO_PENDING) { | 245 if (rv == ERR_IO_PENDING) { |
246 read_in_progress_ = true; | 246 read_in_progress_ = true; |
247 SetStatus(URLRequestStatus(URLRequestStatus::IO_PENDING, 0)); | 247 SetStatus(URLRequestStatus(URLRequestStatus::IO_PENDING, 0)); |
248 } else { | 248 } else { |
249 NotifyDone(URLRequestStatus(URLRequestStatus::FAILED, rv)); | 249 NotifyDone(URLRequestStatus(URLRequestStatus::FAILED, rv)); |
250 } | 250 } |
251 return false; | 251 return false; |
252 } | 252 } |
253 | 253 |
254 } // namespace net | 254 } // namespace net |
OLD | NEW |