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 15 matching lines...) Expand all Loading... |
26 | 26 |
27 // A URLRequestJob subclass that is built on top of FtpTransaction. It | 27 // A URLRequestJob subclass that is built on top of FtpTransaction. It |
28 // provides an implementation for FTP. | 28 // provides an implementation for FTP. |
29 class NET_EXPORT_PRIVATE URLRequestFtpJob : public URLRequestJob { | 29 class NET_EXPORT_PRIVATE URLRequestFtpJob : public URLRequestJob { |
30 public: | 30 public: |
31 URLRequestFtpJob(URLRequest* request, | 31 URLRequestFtpJob(URLRequest* request, |
32 NetworkDelegate* network_delegate, | 32 NetworkDelegate* network_delegate, |
33 FtpTransactionFactory* ftp_transaction_factory, | 33 FtpTransactionFactory* ftp_transaction_factory, |
34 FtpAuthCache* ftp_auth_cache); | 34 FtpAuthCache* ftp_auth_cache); |
35 | 35 |
36 // TODO(shalev): get rid of this function in favor of FtpProtocolHandler. | |
37 static URLRequestJob* Factory(URLRequest* request, | |
38 NetworkDelegate* network_delegate, | |
39 const std::string& scheme); | |
40 | |
41 protected: | 36 protected: |
42 virtual ~URLRequestFtpJob(); | 37 virtual ~URLRequestFtpJob(); |
43 | 38 |
44 // Overridden from URLRequestJob: | 39 // Overridden from URLRequestJob: |
45 virtual bool IsSafeRedirect(const GURL& location) OVERRIDE; | 40 virtual bool IsSafeRedirect(const GURL& location) OVERRIDE; |
46 virtual bool GetMimeType(std::string* mime_type) const OVERRIDE; | 41 virtual bool GetMimeType(std::string* mime_type) const OVERRIDE; |
47 virtual void GetResponseInfo(HttpResponseInfo* info) OVERRIDE; | 42 virtual void GetResponseInfo(HttpResponseInfo* info) OVERRIDE; |
48 virtual HostPortPair GetSocketAddress() const OVERRIDE; | 43 virtual HostPortPair GetSocketAddress() const OVERRIDE; |
49 virtual void SetPriority(RequestPriority priority) OVERRIDE; | 44 virtual void SetPriority(RequestPriority priority) OVERRIDE; |
50 virtual void Start() OVERRIDE; | 45 virtual void Start() OVERRIDE; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 | 98 |
104 FtpTransactionFactory* ftp_transaction_factory_; | 99 FtpTransactionFactory* ftp_transaction_factory_; |
105 FtpAuthCache* ftp_auth_cache_; | 100 FtpAuthCache* ftp_auth_cache_; |
106 | 101 |
107 DISALLOW_COPY_AND_ASSIGN(URLRequestFtpJob); | 102 DISALLOW_COPY_AND_ASSIGN(URLRequestFtpJob); |
108 }; | 103 }; |
109 | 104 |
110 } // namespace net | 105 } // namespace net |
111 | 106 |
112 #endif // NET_URL_REQUEST_URL_REQUEST_FTP_JOB_H_ | 107 #endif // NET_URL_REQUEST_URL_REQUEST_FTP_JOB_H_ |
OLD | NEW |