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 #ifndef NET_URL_REQUEST_URL_REQUEST_FTP_JOB_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_FTP_JOB_H_ |
6 #define NET_URL_REQUEST_URL_REQUEST_FTP_JOB_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_FTP_JOB_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 // A URLRequestJob subclass that is built on top of FtpTransaction. It | 23 // A URLRequestJob subclass that is built on top of FtpTransaction. It |
24 // provides an implementation for FTP. | 24 // provides an implementation for FTP. |
25 class URLRequestFtpJob : public URLRequestJob { | 25 class URLRequestFtpJob : public URLRequestJob { |
26 public: | 26 public: |
27 URLRequestFtpJob(URLRequest* request, | 27 URLRequestFtpJob(URLRequest* request, |
28 NetworkDelegate* network_delegate, | 28 NetworkDelegate* network_delegate, |
29 FtpTransactionFactory* ftp_transaction_factory, | 29 FtpTransactionFactory* ftp_transaction_factory, |
30 FtpAuthCache* ftp_auth_cache); | 30 FtpAuthCache* ftp_auth_cache); |
31 | 31 |
32 // TODO(shalev): get rid of this function in favor of FtpProtocolHandler. | |
33 static URLRequestJob* Factory(URLRequest* request, | |
34 NetworkDelegate* network_delegate, | |
35 const std::string& scheme); | |
36 | |
37 // Overridden from URLRequestJob: | 32 // Overridden from URLRequestJob: |
38 virtual bool GetMimeType(std::string* mime_type) const OVERRIDE; | 33 virtual bool GetMimeType(std::string* mime_type) const OVERRIDE; |
39 virtual HostPortPair GetSocketAddress() const OVERRIDE; | 34 virtual HostPortPair GetSocketAddress() const OVERRIDE; |
40 | 35 |
41 private: | 36 private: |
42 virtual ~URLRequestFtpJob(); | 37 virtual ~URLRequestFtpJob(); |
43 | 38 |
44 void StartTransaction(); | 39 void StartTransaction(); |
45 | 40 |
46 void OnStartCompleted(int result); | 41 void OnStartCompleted(int result); |
(...skipping 30 matching lines...) Expand all Loading... |
77 | 72 |
78 FtpTransactionFactory* ftp_transaction_factory_; | 73 FtpTransactionFactory* ftp_transaction_factory_; |
79 FtpAuthCache* ftp_auth_cache_; | 74 FtpAuthCache* ftp_auth_cache_; |
80 | 75 |
81 DISALLOW_COPY_AND_ASSIGN(URLRequestFtpJob); | 76 DISALLOW_COPY_AND_ASSIGN(URLRequestFtpJob); |
82 }; | 77 }; |
83 | 78 |
84 } // namespace net | 79 } // namespace net |
85 | 80 |
86 #endif // NET_URL_REQUEST_URL_REQUEST_FTP_JOB_H_ | 81 #endif // NET_URL_REQUEST_URL_REQUEST_FTP_JOB_H_ |
OLD | NEW |