diff options
author | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-09 16:53:31 +0000 |
---|---|---|
committer | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-09 16:53:31 +0000 |
commit | 60c413c96834553e182e8c9c34d1e8958f3b0fb5 (patch) | |
tree | db8e37e57691ad25bd737895a5ec487e47107960 /net/url_request/url_request_ftp_job.h | |
parent | dedf2055a80cf9d869767bbd0c99f51e4f31260e (diff) | |
download | chromium_src-60c413c96834553e182e8c9c34d1e8958f3b0fb5.zip chromium_src-60c413c96834553e182e8c9c34d1e8958f3b0fb5.tar.gz chromium_src-60c413c96834553e182e8c9c34d1e8958f3b0fb5.tar.bz2 |
Use FilterContext to allow filters to access URLRequestJob data
r=wtc,darin,huanr
Review URL: http://codereview.chromium.org/40138
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11248 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request/url_request_ftp_job.h')
-rw-r--r-- | net/url_request/url_request_ftp_job.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/net/url_request/url_request_ftp_job.h b/net/url_request/url_request_ftp_job.h index 44e845c..9dcd7e4 100644 --- a/net/url_request/url_request_ftp_job.h +++ b/net/url_request/url_request_ftp_job.h @@ -5,6 +5,8 @@ #ifndef NET_URL_REQUEST_URL_REQUEST_FTP_JOB_H_ #define NET_URL_REQUEST_URL_REQUEST_FTP_JOB_H_ +#include <string> + #include "net/url_request/url_request_inet_job.h" // A basic FTP job that handles download files and showing directory listings. @@ -16,13 +18,13 @@ class URLRequestFtpJob : public URLRequestInetJob { // URLRequestJob methods: virtual void Start(); - virtual bool GetMimeType(std::string* mime_type); + virtual bool GetMimeType(std::string* mime_type) const; // URLRequestInetJob methods: virtual void OnIOComplete(const AsyncResult& result); protected: - URLRequestFtpJob(URLRequest* request); + explicit URLRequestFtpJob(URLRequest* request); // Starts the WinInet request. virtual void SendRequest(); @@ -65,17 +67,19 @@ class URLRequestFtpJob : public URLRequestInetJob { // Continuation function for calling OnIOComplete through the message loop. virtual void ContinueIOComplete(int bytes_written); - // Continuation function for calling NotifyHeadersComplete through - //the message loop + // Continuation function for calling NotifyHeadersComplete through the message + // loop. virtual void ContinueNotifyHeadersComplete(); typedef enum { START = 0x200, // initial state of the ftp job CONNECTING, // opening the url - SETTING_CUR_DIRECTORY, // attempting to change current dir to match request - FINDING_FIRST_FILE, // retrieving first file information in cur dir (by FtpFindFirstFile) + SETTING_CUR_DIRECTORY, // attempting to change current dir to match request + FINDING_FIRST_FILE, // retrieving first file information in cur dir (by + // FtpFindFirstFile) GETTING_DIRECTORY, // retrieving the directory listing (if directory) - GETTING_FILE_HANDLE, // initiate access to file by call to FtpOpenFile (if file) + GETTING_FILE_HANDLE, // initiate access to file by call to FtpOpenFile + // (if file). GETTING_FILE, // retrieving the file (if file) DONE // URLRequestInetJob is reading the response now } FtpJobState; @@ -91,7 +95,7 @@ class URLRequestFtpJob : public URLRequestInetJob { bool is_directory_; // does the url point to a file or directory WIN32_FIND_DATAA find_data_; - std::string directory_html_; // if url is directory holds html + std::string directory_html_; // if url is directory holds html // When building a directory listing, we need to temporarily hold on to the // buffer in between the time a Read() call comes in and we get the file |