| Index: net/url_request/url_request_ftp_job.h
|
| ===================================================================
|
| --- net/url_request/url_request_ftp_job.h (revision 11030)
|
| +++ net/url_request/url_request_ftp_job.h (working copy)
|
| @@ -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 @@
|
|
|
| // 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 @@
|
| // 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 @@
|
|
|
| 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
|
|
|