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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_new_ftp_job.h
===================================================================
--- net/url_request/url_request_new_ftp_job.h (revision 0)
+++ net/url_request/url_request_new_ftp_job.h (revision 0)
@@ -0,0 +1,60 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef NET_URL_REQUEST_URL_REQUEST_NEW_FTP_JOB_H_
+#define NET_URL_REQUEST_URL_REQUEST_NEW_FTP_JOB_H_
+
+#include <string>
+#include <vector>
+
+#include "net/base/auth.h"
+#include "net/base/completion_callback.h"
+#include "net/url_request/url_request_job.h"
+
+class URLRequestContext;
+
+// A URLRequestJob subclass that is built on top of FtpTransaction. It
+// provides an implementation for FTP.
+class URLRequestNewFtpJob : public URLRequestJob {
+ public:
+
+ explicit URLRequestNewFtpJob(URLRequest* request);
+
+ virtual ~URLRequestNewFtpJob();
+
+ static URLRequestJob* Factory(URLRequest* request, const std::string& scheme);
+
+ private:
+ // URLRequestJob methods:
+ virtual void Start();
+ virtual void Kill();
+ virtual uint64 GetUploadProgress() const;
+ virtual void GetResponseInfo();
+ virtual int GetResponseCode();
+ virtual bool GetMoreData();
+ virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int *bytes_read);
+
+ void NotifyHeadersComplete();
+
+ void DestroyTransaction();
+ void StartTransaction();
+
+ void OnStartCompleted(int result);
+ void OnReadCompleted(int result);
+
+ net::AuthState server_auth_state_;
+
+ net::CompletionCallbackImpl<URLRequestNewFtpJob> start_callback_;
+ net::CompletionCallbackImpl<URLRequestNewFtpJob> read_callback_;
+
+ bool read_in_progress_;
+
+ // Keep a reference to the url request context to be sure it's not deleted
+ // before us.
+ scoped_refptr<URLRequestContext> context_;
+
+ DISALLOW_COPY_AND_ASSIGN(URLRequestNewFtpJob);
+};
+
+#endif // NET_URL_REQUEST_URL_REQUEST_NEW_FTP_JOB_H_
« 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