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

Unified Diff: net/url_request/url_request_new_ftp_job.cc

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_new_ftp_job.h ('k') | no next file » | 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.cc
===================================================================
--- net/url_request/url_request_new_ftp_job.cc (revision 0)
+++ net/url_request/url_request_new_ftp_job.cc (revision 0)
@@ -0,0 +1,90 @@
+// 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.
+
+#include "net/url_request/url_request_new_ftp_job.h"
+
+#include "base/file_version_info.h"
+#include "net/base/net_util.h"
+#include "net/url_request/url_request.h"
+#include "net/url_request/url_request_context.h"
+#include "net/url_request/url_request_error_job.h"
+
+
+URLRequestNewFtpJob::URLRequestNewFtpJob(URLRequest* request)
+ : URLRequestJob(request),
+ server_auth_state_(net::AUTH_STATE_DONT_NEED_AUTH),
+ ALLOW_THIS_IN_INITIALIZER_LIST(
+ start_callback_(this, &URLRequestNewFtpJob::OnStartCompleted)),
+ ALLOW_THIS_IN_INITIALIZER_LIST(
+ read_callback_(this, &URLRequestNewFtpJob::OnReadCompleted)),
+ read_in_progress_(false),
+ context_(request->context()) {
+}
+
+URLRequestNewFtpJob::~URLRequestNewFtpJob() {
+}
+
+// static
+URLRequestJob* URLRequestNewFtpJob::Factory(URLRequest* request,
+ const std::string& scheme) {
+ DCHECK(scheme == "ftp");
+
+ if (request->url().has_port() &&
+ !net::IsPortAllowedByFtp(request->url().IntPort()))
+ return new URLRequestErrorJob(request, net::ERR_UNSAFE_PORT);
+
+ DCHECK(request->context());
+ DCHECK(request->context()->ftp_transaction_factory());
+ return new URLRequestNewFtpJob(request);
+}
+
+void URLRequestNewFtpJob::Start() {
+ NOTIMPLEMENTED();
+}
+
+void URLRequestNewFtpJob::Kill() {
+ NOTIMPLEMENTED();
+}
+
+uint64 URLRequestNewFtpJob::GetUploadProgress() const {
+ NOTIMPLEMENTED();
+ return 0;
+}
+
+void URLRequestNewFtpJob::GetResponseInfo() {
+ NOTIMPLEMENTED();
+}
+
+int URLRequestNewFtpJob::GetResponseCode() {
+ NOTIMPLEMENTED();
+ return -1;
+}
+
+bool URLRequestNewFtpJob::GetMoreData() {
+ NOTIMPLEMENTED();
+ return false;
+}
+
+bool URLRequestNewFtpJob::ReadRawData(net::IOBuffer* buf,
+ int buf_size,
+ int *bytes_read) {
+ NOTIMPLEMENTED();
+ return false;
+}
+
+void URLRequestNewFtpJob::OnStartCompleted(int result) {
+ NOTIMPLEMENTED();
+}
+
+void URLRequestNewFtpJob::OnReadCompleted(int result) {
+ NOTIMPLEMENTED();
+}
+
+void URLRequestNewFtpJob::DestroyTransaction() {
+ NOTIMPLEMENTED();
+}
+
+void URLRequestNewFtpJob::StartTransaction() {
+ NOTIMPLEMENTED();
+}
« no previous file with comments | « net/url_request/url_request_new_ftp_job.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698