| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef NET_URL_REQUEST_URL_REQUEST_NEW_FTP_JOB_H_ |
| 6 #define NET_URL_REQUEST_URL_REQUEST_NEW_FTP_JOB_H_ |
| 7 |
| 8 #include <string> |
| 9 #include <vector> |
| 10 |
| 11 #include "net/base/auth.h" |
| 12 #include "net/base/completion_callback.h" |
| 13 #include "net/url_request/url_request_job.h" |
| 14 |
| 15 class URLRequestContext; |
| 16 |
| 17 // A URLRequestJob subclass that is built on top of FtpTransaction. It |
| 18 // provides an implementation for FTP. |
| 19 class URLRequestNewFtpJob : public URLRequestJob { |
| 20 public: |
| 21 |
| 22 explicit URLRequestNewFtpJob(URLRequest* request); |
| 23 |
| 24 virtual ~URLRequestNewFtpJob(); |
| 25 |
| 26 static URLRequestJob* Factory(URLRequest* request, const std::string& scheme); |
| 27 |
| 28 private: |
| 29 // URLRequestJob methods: |
| 30 virtual void Start(); |
| 31 virtual void Kill(); |
| 32 virtual uint64 GetUploadProgress() const; |
| 33 virtual void GetResponseInfo(); |
| 34 virtual int GetResponseCode(); |
| 35 virtual bool GetMoreData(); |
| 36 virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int *bytes_read); |
| 37 |
| 38 void NotifyHeadersComplete(); |
| 39 |
| 40 void DestroyTransaction(); |
| 41 void StartTransaction(); |
| 42 |
| 43 void OnStartCompleted(int result); |
| 44 void OnReadCompleted(int result); |
| 45 |
| 46 net::AuthState server_auth_state_; |
| 47 |
| 48 net::CompletionCallbackImpl<URLRequestNewFtpJob> start_callback_; |
| 49 net::CompletionCallbackImpl<URLRequestNewFtpJob> read_callback_; |
| 50 |
| 51 bool read_in_progress_; |
| 52 |
| 53 // Keep a reference to the url request context to be sure it's not deleted |
| 54 // before us. |
| 55 scoped_refptr<URLRequestContext> context_; |
| 56 |
| 57 DISALLOW_COPY_AND_ASSIGN(URLRequestNewFtpJob); |
| 58 }; |
| 59 |
| 60 #endif // NET_URL_REQUEST_URL_REQUEST_NEW_FTP_JOB_H_ |
| OLD | NEW |