Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(361)

Side by Side Diff: net/url_request/url_request_new_ftp_job.h

Issue 39130: FTP Transaction code for new Portable FTP(Patch SET-3) (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/ftp/ftp_transaction.h ('k') | net/url_request/url_request_new_ftp_job.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_NEW_FTP_JOB_H_ 5 #ifndef NET_URL_REQUEST_URL_REQUEST_NEW_FTP_JOB_H_
6 #define NET_URL_REQUEST_URL_REQUEST_NEW_FTP_JOB_H_ 6 #define NET_URL_REQUEST_URL_REQUEST_NEW_FTP_JOB_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "net/base/auth.h" 11 #include "net/base/auth.h"
12 #include "net/base/completion_callback.h" 12 #include "net/base/completion_callback.h"
13 #include "net/ftp/ftp_request_info.h"
14 #include "net/ftp/ftp_transaction.h"
13 #include "net/url_request/url_request_job.h" 15 #include "net/url_request/url_request_job.h"
14 16
15 class URLRequestContext; 17 class URLRequestContext;
16 18
17 // A URLRequestJob subclass that is built on top of FtpTransaction. It 19 // A URLRequestJob subclass that is built on top of FtpTransaction. It
18 // provides an implementation for FTP. 20 // provides an implementation for FTP.
19 class URLRequestNewFtpJob : public URLRequestJob { 21 class URLRequestNewFtpJob : public URLRequestJob {
20 public: 22 public:
21 23
22 explicit URLRequestNewFtpJob(URLRequest* request); 24 explicit URLRequestNewFtpJob(URLRequest* request);
23 25
24 virtual ~URLRequestNewFtpJob(); 26 virtual ~URLRequestNewFtpJob();
25 27
26 static URLRequestJob* Factory(URLRequest* request, const std::string& scheme); 28 static URLRequestJob* Factory(URLRequest* request, const std::string& scheme);
27 29
28 private: 30 private:
29 // URLRequestJob methods: 31 // URLRequestJob methods:
30 virtual void Start(); 32 virtual void Start();
31 virtual void Kill(); 33 virtual void Kill();
32 virtual uint64 GetUploadProgress() const; 34
33 virtual void GetResponseInfo(); 35 // TODO(ibrar): Yet to give another look at this function.
34 virtual int GetResponseCode() const; 36 virtual uint64 GetUploadProgress() const { return 0; }
35 virtual bool GetMoreData();
36 virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int *bytes_read); 37 virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int *bytes_read);
37 38
38 void NotifyHeadersComplete(); 39 void NotifyHeadersComplete();
39 40
40 void DestroyTransaction(); 41 void DestroyTransaction();
41 void StartTransaction(); 42 void StartTransaction();
42 43
43 void OnStartCompleted(int result); 44 void OnStartCompleted(int result);
44 void OnReadCompleted(int result); 45 void OnReadCompleted(int result);
45 46
47
48 net::FtpRequestInfo request_info_;
49 scoped_ptr<net::FtpTransaction> transaction_;
50 const net::FtpResponseInfo* response_info_;
51
46 net::AuthState server_auth_state_; 52 net::AuthState server_auth_state_;
47 53
48 net::CompletionCallbackImpl<URLRequestNewFtpJob> start_callback_; 54 net::CompletionCallbackImpl<URLRequestNewFtpJob> start_callback_;
49 net::CompletionCallbackImpl<URLRequestNewFtpJob> read_callback_; 55 net::CompletionCallbackImpl<URLRequestNewFtpJob> read_callback_;
50 56
57 std::string directory_html_;
51 bool read_in_progress_; 58 bool read_in_progress_;
52 59
53 // Keep a reference to the url request context to be sure it's not deleted 60 // Keep a reference to the url request context to be sure it's not deleted
54 // before us. 61 // before us.
55 scoped_refptr<URLRequestContext> context_; 62 scoped_refptr<URLRequestContext> context_;
56 63
57 DISALLOW_COPY_AND_ASSIGN(URLRequestNewFtpJob); 64 DISALLOW_COPY_AND_ASSIGN(URLRequestNewFtpJob);
58 }; 65 };
59 66
60 #endif // NET_URL_REQUEST_URL_REQUEST_NEW_FTP_JOB_H_ 67 #endif // NET_URL_REQUEST_URL_REQUEST_NEW_FTP_JOB_H_
OLDNEW
« no previous file with comments | « net/ftp/ftp_transaction.h ('k') | net/url_request/url_request_new_ftp_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698