OLD | NEW |
1 // Copyright (c) 2009 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 "net/base/auth.h" | 12 #include "net/base/auth.h" |
12 #include "net/base/completion_callback.h" | 13 #include "net/base/completion_callback.h" |
13 #include "net/ftp/ftp_request_info.h" | 14 #include "net/ftp/ftp_request_info.h" |
14 #include "net/ftp/ftp_transaction.h" | 15 #include "net/ftp/ftp_transaction.h" |
15 #include "net/url_request/url_request_job.h" | 16 #include "net/url_request/url_request_job.h" |
16 | 17 |
17 class URLRequestContext; | 18 class URLRequestContext; |
18 | 19 |
19 namespace net { | 20 namespace net { |
20 struct list_state; | 21 struct list_state; |
(...skipping 14 matching lines...) Expand all Loading... |
35 private: | 36 private: |
36 virtual ~URLRequestFtpJob(); | 37 virtual ~URLRequestFtpJob(); |
37 | 38 |
38 // URLRequestJob methods: | 39 // URLRequestJob methods: |
39 virtual void Start(); | 40 virtual void Start(); |
40 virtual void Kill(); | 41 virtual void Kill(); |
41 virtual net::LoadState GetLoadState() const; | 42 virtual net::LoadState GetLoadState() const; |
42 virtual bool NeedsAuth(); | 43 virtual bool NeedsAuth(); |
43 virtual void GetAuthChallengeInfo( | 44 virtual void GetAuthChallengeInfo( |
44 scoped_refptr<net::AuthChallengeInfo>* auth_info); | 45 scoped_refptr<net::AuthChallengeInfo>* auth_info); |
45 virtual void SetAuth(const std::wstring& username, | 46 virtual void SetAuth(const string16& username, |
46 const std::wstring& password); | 47 const string16& password); |
47 virtual void CancelAuth(); | 48 virtual void CancelAuth(); |
48 | 49 |
49 // TODO(ibrar): Yet to give another look at this function. | 50 // TODO(ibrar): Yet to give another look at this function. |
50 virtual uint64 GetUploadProgress() const { return 0; } | 51 virtual uint64 GetUploadProgress() const { return 0; } |
51 virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int *bytes_read); | 52 virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int *bytes_read); |
52 | 53 |
53 void DestroyTransaction(); | 54 void DestroyTransaction(); |
54 void StartTransaction(); | 55 void StartTransaction(); |
55 | 56 |
56 void OnStartCompleted(int result); | 57 void OnStartCompleted(int result); |
(...skipping 14 matching lines...) Expand all Loading... |
71 scoped_refptr<net::AuthData> server_auth_; | 72 scoped_refptr<net::AuthData> server_auth_; |
72 | 73 |
73 // Keep a reference to the url request context to be sure it's not deleted | 74 // Keep a reference to the url request context to be sure it's not deleted |
74 // before us. | 75 // before us. |
75 scoped_refptr<URLRequestContext> context_; | 76 scoped_refptr<URLRequestContext> context_; |
76 | 77 |
77 DISALLOW_COPY_AND_ASSIGN(URLRequestFtpJob); | 78 DISALLOW_COPY_AND_ASSIGN(URLRequestFtpJob); |
78 }; | 79 }; |
79 | 80 |
80 #endif // NET_URL_REQUEST_URL_REQUEST_FTP_JOB_H_ | 81 #endif // NET_URL_REQUEST_URL_REQUEST_FTP_JOB_H_ |
OLD | NEW |