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

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

Issue 848006: Generalize the net module's LoadLog facility from a passive container, to an event stream (NetLog). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Split up RequestTracker into ConnectJobTracker+RequestTracker+RequestTrackerBase, address comments Created 10 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_http_job.cc ('k') | 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/message_loop.h" 8 #include "base/message_loop.h"
9 #include "net/base/auth.h" 9 #include "net/base/auth.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 218
219 transaction_.reset( 219 transaction_.reset(
220 request_->context()->ftp_transaction_factory()->CreateTransaction()); 220 request_->context()->ftp_transaction_factory()->CreateTransaction());
221 221
222 // No matter what, we want to report our status as IO pending since we will 222 // No matter what, we want to report our status as IO pending since we will
223 // be notifying our consumer asynchronously via OnStartCompleted. 223 // be notifying our consumer asynchronously via OnStartCompleted.
224 SetStatus(URLRequestStatus(URLRequestStatus::IO_PENDING, 0)); 224 SetStatus(URLRequestStatus(URLRequestStatus::IO_PENDING, 0));
225 int rv; 225 int rv;
226 if (transaction_.get()) { 226 if (transaction_.get()) {
227 rv = transaction_->Start( 227 rv = transaction_->Start(
228 &request_info_, &start_callback_, request_->load_log()); 228 &request_info_, &start_callback_, request_->net_log());
229 if (rv == net::ERR_IO_PENDING) 229 if (rv == net::ERR_IO_PENDING)
230 return; 230 return;
231 } else { 231 } else {
232 rv = net::ERR_FAILED; 232 rv = net::ERR_FAILED;
233 } 233 }
234 // The transaction started synchronously, but we need to notify the 234 // The transaction started synchronously, but we need to notify the
235 // URLRequest delegate via the message loop. 235 // URLRequest delegate via the message loop.
236 MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod( 236 MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod(
237 this, &URLRequestNewFtpJob::OnStartCompleted, rv)); 237 this, &URLRequestNewFtpJob::OnStartCompleted, rv));
238 } 238 }
239 239
240 void URLRequestNewFtpJob::DestroyTransaction() { 240 void URLRequestNewFtpJob::DestroyTransaction() {
241 DCHECK(transaction_.get()); 241 DCHECK(transaction_.get());
242 242
243 transaction_.reset(); 243 transaction_.reset();
244 } 244 }
OLDNEW
« no previous file with comments | « net/url_request/url_request_http_job.cc ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698