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

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

Issue 165142: Re-enable remaining FTP unit tests. (Closed)
Patch Set: Created 11 years, 4 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
« no previous file with comments | « no previous file | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 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 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 #include "net/url_request/url_request_new_ftp_job.h" 5 #include "net/url_request/url_request_new_ftp_job.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/file_version_info.h" 8 #include "base/file_version_info.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/sys_string_conversions.h" 10 #include "base/sys_string_conversions.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 return; 239 return;
240 // If the transaction was destroyed, then the job was cancelled, and 240 // If the transaction was destroyed, then the job was cancelled, and
241 // we can just ignore this notification. 241 // we can just ignore this notification.
242 if (!transaction_.get()) 242 if (!transaction_.get())
243 return; 243 return;
244 // Clear the IO_PENDING status 244 // Clear the IO_PENDING status
245 SetStatus(URLRequestStatus()); 245 SetStatus(URLRequestStatus());
246 if (result == net::OK) { 246 if (result == net::OK) {
247 NotifyHeadersComplete(); 247 NotifyHeadersComplete();
248 } else { 248 } else {
249 NotifyStartError(URLRequestStatus(URLRequestStatus::FAILED, result)); 249 NotifyDone(URLRequestStatus(URLRequestStatus::FAILED, result));
wtc 2009/08/07 19:10:20 I verified that this is what the old URLRequestFtp
250 } 250 }
251 } 251 }
252 252
253 void URLRequestNewFtpJob::OnReadCompleted(int result) { 253 void URLRequestNewFtpJob::OnReadCompleted(int result) {
254 read_in_progress_ = false; 254 read_in_progress_ = false;
255 if (result == 0) { 255 if (result == 0) {
256 NotifyDone(URLRequestStatus()); 256 NotifyDone(URLRequestStatus());
257 } else if (result < 0) { 257 } else if (result < 0) {
258 NotifyDone(URLRequestStatus(URLRequestStatus::FAILED, result)); 258 NotifyDone(URLRequestStatus(URLRequestStatus::FAILED, result));
259 } else { 259 } else {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod( 293 MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod(
294 this, &URLRequestNewFtpJob::OnStartCompleted, rv)); 294 this, &URLRequestNewFtpJob::OnStartCompleted, rv));
295 } 295 }
296 296
297 void URLRequestNewFtpJob::DestroyTransaction() { 297 void URLRequestNewFtpJob::DestroyTransaction() {
298 DCHECK(transaction_.get()); 298 DCHECK(transaction_.get());
299 299
300 transaction_.reset(); 300 transaction_.reset();
301 response_info_ = NULL; 301 response_info_ = NULL;
302 } 302 }
OLDNEW
« no previous file with comments | « no previous file | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698