OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/string16.h" | 11 #include "base/string16.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 class URLRequestContext; | 18 class URLRequestContext; |
19 | 19 |
20 // A URLRequestJob subclass that is built on top of FtpTransaction. It | 20 // A URLRequestJob subclass that is built on top of FtpTransaction. It |
21 // provides an implementation for FTP. | 21 // provides an implementation for FTP. |
22 class URLRequestFtpJob : public URLRequestJob { | 22 class URLRequestFtpJob : public URLRequestJob { |
23 public: | 23 public: |
24 | 24 |
25 explicit URLRequestFtpJob(URLRequest* request); | 25 explicit URLRequestFtpJob(net::URLRequest* request); |
26 | 26 |
27 static URLRequestJob* Factory(URLRequest* request, const std::string& scheme); | 27 static URLRequestJob* Factory(net::URLRequest* request, |
| 28 const std::string& scheme); |
28 | 29 |
29 // URLRequestJob methods: | 30 // URLRequestJob methods: |
30 virtual bool GetMimeType(std::string* mime_type) const; | 31 virtual bool GetMimeType(std::string* mime_type) const; |
31 | 32 |
32 private: | 33 private: |
33 virtual ~URLRequestFtpJob(); | 34 virtual ~URLRequestFtpJob(); |
34 | 35 |
35 // URLRequestJob methods: | 36 // URLRequestJob methods: |
36 virtual void Start(); | 37 virtual void Start(); |
37 virtual void Kill(); | 38 virtual void Kill(); |
(...skipping 30 matching lines...) Expand all Loading... |
68 scoped_refptr<net::AuthData> server_auth_; | 69 scoped_refptr<net::AuthData> server_auth_; |
69 | 70 |
70 // Keep a reference to the url request context to be sure it's not deleted | 71 // Keep a reference to the url request context to be sure it's not deleted |
71 // before us. | 72 // before us. |
72 scoped_refptr<URLRequestContext> context_; | 73 scoped_refptr<URLRequestContext> context_; |
73 | 74 |
74 DISALLOW_COPY_AND_ASSIGN(URLRequestFtpJob); | 75 DISALLOW_COPY_AND_ASSIGN(URLRequestFtpJob); |
75 }; | 76 }; |
76 | 77 |
77 #endif // NET_URL_REQUEST_URL_REQUEST_FTP_JOB_H_ | 78 #endif // NET_URL_REQUEST_URL_REQUEST_FTP_JOB_H_ |
OLD | NEW |