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 14 matching lines...) Expand all Loading... |
25 | 25 |
26 // A URLRequestJob subclass that is built on top of FtpTransaction. It | 26 // A URLRequestJob subclass that is built on top of FtpTransaction. It |
27 // provides an implementation for FTP. | 27 // provides an implementation for FTP. |
28 class URLRequestFtpJob : public URLRequestJob { | 28 class URLRequestFtpJob : public URLRequestJob { |
29 public: | 29 public: |
30 URLRequestFtpJob(URLRequest* request, | 30 URLRequestFtpJob(URLRequest* request, |
31 NetworkDelegate* network_delegate, | 31 NetworkDelegate* network_delegate, |
32 FtpTransactionFactory* ftp_transaction_factory, | 32 FtpTransactionFactory* ftp_transaction_factory, |
33 FtpAuthCache* ftp_auth_cache); | 33 FtpAuthCache* ftp_auth_cache); |
34 | 34 |
| 35 // TODO(shalev): get rid of this function in favor of FtpProtocolHandler. |
| 36 static URLRequestJob* Factory(URLRequest* request, |
| 37 NetworkDelegate* network_delegate, |
| 38 const std::string& scheme); |
| 39 |
35 // Overridden from URLRequestJob: | 40 // Overridden from URLRequestJob: |
36 virtual bool IsSafeRedirect(const GURL& location) OVERRIDE; | 41 virtual bool IsSafeRedirect(const GURL& location) OVERRIDE; |
37 virtual bool GetMimeType(std::string* mime_type) const OVERRIDE; | 42 virtual bool GetMimeType(std::string* mime_type) const OVERRIDE; |
38 virtual void GetResponseInfo(HttpResponseInfo* info) OVERRIDE; | 43 virtual void GetResponseInfo(HttpResponseInfo* info) OVERRIDE; |
39 virtual HostPortPair GetSocketAddress() const OVERRIDE; | 44 virtual HostPortPair GetSocketAddress() const OVERRIDE; |
40 | 45 |
41 private: | 46 private: |
42 virtual ~URLRequestFtpJob(); | 47 virtual ~URLRequestFtpJob(); |
43 | 48 |
44 void OnResolveProxyComplete(int result); | 49 void OnResolveProxyComplete(int result); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 | 93 |
89 FtpTransactionFactory* ftp_transaction_factory_; | 94 FtpTransactionFactory* ftp_transaction_factory_; |
90 FtpAuthCache* ftp_auth_cache_; | 95 FtpAuthCache* ftp_auth_cache_; |
91 | 96 |
92 DISALLOW_COPY_AND_ASSIGN(URLRequestFtpJob); | 97 DISALLOW_COPY_AND_ASSIGN(URLRequestFtpJob); |
93 }; | 98 }; |
94 | 99 |
95 } // namespace net | 100 } // namespace net |
96 | 101 |
97 #endif // NET_URL_REQUEST_URL_REQUEST_FTP_JOB_H_ | 102 #endif // NET_URL_REQUEST_URL_REQUEST_FTP_JOB_H_ |
OLD | NEW |