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

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

Issue 42197: Add command line switch "--new-ftp" for new portable... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Upload before checkin Created 11 years, 9 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/url_request/url_request_ftp_job.cc ('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
(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_
OLDNEW
« no previous file with comments | « net/url_request/url_request_ftp_job.cc ('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