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

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

Issue 10537056: Replaced static URLRequestFtpJob factory with non-static protocol handler for FTP jobs. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Removed whitespace Created 8 years, 5 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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.h" 5 #include "net/url_request/url_request.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 404
405 void URLRequest::set_delegate(Delegate* delegate) { 405 void URLRequest::set_delegate(Delegate* delegate) {
406 delegate_ = delegate; 406 delegate_ = delegate;
407 } 407 }
408 408
409 void URLRequest::Start() { 409 void URLRequest::Start() {
410 g_url_requests_started = true; 410 g_url_requests_started = true;
411 response_info_.request_time = Time::Now(); 411 response_info_.request_time = Time::Now();
412 412
413 // Only notify the delegate for the initial request. 413 // Only notify the delegate for the initial request.
414 if (context_ && context_->network_delegate()) { 414 if (context_->network_delegate()) {
415 int error = context_->network_delegate()->NotifyBeforeURLRequest( 415 int error = context_->network_delegate()->NotifyBeforeURLRequest(
416 this, before_request_callback_, &delegate_redirect_url_); 416 this, before_request_callback_, &delegate_redirect_url_);
417 if (error == net::ERR_IO_PENDING) { 417 if (error == net::ERR_IO_PENDING) {
418 // Paused on the delegate, will invoke |before_request_callback_| later. 418 // Paused on the delegate, will invoke |before_request_callback_| later.
419 SetBlockedOnDelegate(); 419 SetBlockedOnDelegate();
420 } else { 420 } else {
421 BeforeRequestComplete(error); 421 BeforeRequestComplete(error);
422 } 422 }
423 return; 423 return;
424 } 424 }
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
904 new base::debug::StackTrace(NULL, 0); 904 new base::debug::StackTrace(NULL, 0);
905 *stack_trace_copy = stack_trace; 905 *stack_trace_copy = stack_trace;
906 stack_trace_.reset(stack_trace_copy); 906 stack_trace_.reset(stack_trace_copy);
907 } 907 }
908 908
909 const base::debug::StackTrace* URLRequest::stack_trace() const { 909 const base::debug::StackTrace* URLRequest::stack_trace() const {
910 return stack_trace_.get(); 910 return stack_trace_.get();
911 } 911 }
912 912
913 } // namespace net 913 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698