| OLD | NEW |
| 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 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 void URLRequest::set_referrer_policy(ReferrerPolicy referrer_policy) { | 480 void URLRequest::set_referrer_policy(ReferrerPolicy referrer_policy) { |
| 481 DCHECK(!is_pending_); | 481 DCHECK(!is_pending_); |
| 482 referrer_policy_ = referrer_policy; | 482 referrer_policy_ = referrer_policy; |
| 483 } | 483 } |
| 484 | 484 |
| 485 void URLRequest::set_delegate(Delegate* delegate) { | 485 void URLRequest::set_delegate(Delegate* delegate) { |
| 486 delegate_ = delegate; | 486 delegate_ = delegate; |
| 487 } | 487 } |
| 488 | 488 |
| 489 void URLRequest::Start() { | 489 void URLRequest::Start() { |
| 490 // TODO(pkasting): Remove ScopedTracker below once crbug.com/456327 is fixed. |
| 491 tracked_objects::ScopedTracker tracking_profile( |
| 492 FROM_HERE_WITH_EXPLICIT_FUNCTION("456327 URLRequest::Start")); |
| 493 |
| 490 // Some values can be NULL, but the job factory must not be. | 494 // Some values can be NULL, but the job factory must not be. |
| 491 DCHECK(context_->job_factory()); | 495 DCHECK(context_->job_factory()); |
| 492 | 496 |
| 493 // Anything that sets |blocked_by_| before start should have cleaned up after | 497 // Anything that sets |blocked_by_| before start should have cleaned up after |
| 494 // itself. | 498 // itself. |
| 495 DCHECK(blocked_by_.empty()); | 499 DCHECK(blocked_by_.empty()); |
| 496 | 500 |
| 497 g_url_requests_started = true; | 501 g_url_requests_started = true; |
| 498 response_info_.request_time = base::Time::Now(); | 502 response_info_.request_time = base::Time::Now(); |
| 499 | 503 |
| (...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1215 new base::debug::StackTrace(NULL, 0); | 1219 new base::debug::StackTrace(NULL, 0); |
| 1216 *stack_trace_copy = stack_trace; | 1220 *stack_trace_copy = stack_trace; |
| 1217 stack_trace_.reset(stack_trace_copy); | 1221 stack_trace_.reset(stack_trace_copy); |
| 1218 } | 1222 } |
| 1219 | 1223 |
| 1220 const base::debug::StackTrace* URLRequest::stack_trace() const { | 1224 const base::debug::StackTrace* URLRequest::stack_trace() const { |
| 1221 return stack_trace_.get(); | 1225 return stack_trace_.get(); |
| 1222 } | 1226 } |
| 1223 | 1227 |
| 1224 } // namespace net | 1228 } // namespace net |
| OLD | NEW |