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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "net/base/auth.h" | 12 #include "net/base/auth.h" |
13 #include "net/base/completion_callback.h" | 13 #include "net/base/completion_callback.h" |
14 #include "net/ftp/ftp_request_info.h" | 14 #include "net/ftp/ftp_request_info.h" |
15 #include "net/ftp/ftp_transaction.h" | 15 #include "net/ftp/ftp_transaction.h" |
16 #include "net/url_request/url_request_job.h" | 16 #include "net/url_request/url_request_job.h" |
17 | 17 |
18 namespace net { | 18 namespace net { |
19 | 19 |
20 class NetworkDelegate; | |
21 class FtpTransactionFactory; | |
22 class FtpAuthCache; | |
20 class URLRequestContext; | 23 class URLRequestContext; |
21 | 24 |
22 // A URLRequestJob subclass that is built on top of FtpTransaction. It | 25 // A URLRequestJob subclass that is built on top of FtpTransaction. It |
23 // provides an implementation for FTP. | 26 // provides an implementation for FTP. |
24 class URLRequestFtpJob : public URLRequestJob { | 27 class URLRequestFtpJob : public URLRequestJob { |
25 public: | 28 public: |
26 explicit URLRequestFtpJob(URLRequest* request); | 29 URLRequestFtpJob(URLRequest* request, |
30 NetworkDelegate* network_delegate, | |
31 FtpTransactionFactory* ftp_transaction_factory, | |
32 FtpAuthCache* ftp_auth_cache); | |
27 | 33 |
28 static URLRequestJob* Factory(URLRequest* request, | 34 static URLRequestJob* Factory(URLRequest* request, |
29 const std::string& scheme); | 35 const std::string& scheme); |
30 | 36 |
31 // Overridden from URLRequestJob: | 37 // Overridden from URLRequestJob: |
32 virtual bool GetMimeType(std::string* mime_type) const OVERRIDE; | 38 virtual bool GetMimeType(std::string* mime_type) const OVERRIDE; |
33 virtual HostPortPair GetSocketAddress() const OVERRIDE; | 39 virtual HostPortPair GetSocketAddress() const OVERRIDE; |
34 | 40 |
35 private: | 41 private: |
36 virtual ~URLRequestFtpJob(); | 42 virtual ~URLRequestFtpJob(); |
(...skipping 25 matching lines...) Expand all Loading... | |
62 | 68 |
63 FtpRequestInfo request_info_; | 69 FtpRequestInfo request_info_; |
64 scoped_ptr<FtpTransaction> transaction_; | 70 scoped_ptr<FtpTransaction> transaction_; |
65 | 71 |
66 bool read_in_progress_; | 72 bool read_in_progress_; |
67 | 73 |
68 scoped_refptr<AuthData> server_auth_; | 74 scoped_refptr<AuthData> server_auth_; |
69 | 75 |
70 base::WeakPtrFactory<URLRequestFtpJob> weak_factory_; | 76 base::WeakPtrFactory<URLRequestFtpJob> weak_factory_; |
71 | 77 |
78 NetworkDelegate* network_delegate_; | |
erikwright (departed)
2012/06/21 20:21:30
not used. remove.
shalev
2012/06/21 20:38:54
Done.
| |
79 FtpTransactionFactory* ftp_transaction_factory_; | |
80 FtpAuthCache* ftp_auth_cache_; | |
81 | |
72 DISALLOW_COPY_AND_ASSIGN(URLRequestFtpJob); | 82 DISALLOW_COPY_AND_ASSIGN(URLRequestFtpJob); |
73 }; | 83 }; |
74 | 84 |
75 } // namespace net | 85 } // namespace net |
76 | 86 |
77 #endif // NET_URL_REQUEST_URL_REQUEST_FTP_JOB_H_ | 87 #endif // NET_URL_REQUEST_URL_REQUEST_FTP_JOB_H_ |
OLD | NEW |