| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/debug/stack_trace.h" | |
| 14 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
| 15 #include "base/memory/singleton.h" | 14 #include "base/memory/singleton.h" |
| 16 #include "base/message_loop/message_loop.h" | 15 #include "base/message_loop/message_loop.h" |
| 17 #include "base/profiler/scoped_tracker.h" | 16 #include "base/profiler/scoped_tracker.h" |
| 18 #include "base/rand_util.h" | 17 #include "base/rand_util.h" |
| 19 #include "base/stl_util.h" | 18 #include "base/stl_util.h" |
| 20 #include "base/strings/utf_string_conversions.h" | 19 #include "base/strings/utf_string_conversions.h" |
| 21 #include "base/synchronization/lock.h" | 20 #include "base/synchronization/lock.h" |
| 22 #include "base/values.h" | 21 #include "base/values.h" |
| 23 #include "net/base/auth.h" | 22 #include "net/base/auth.h" |
| (...skipping 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1184 | 1183 |
| 1185 void URLRequest::OnCallToDelegateComplete() { | 1184 void URLRequest::OnCallToDelegateComplete() { |
| 1186 // This should have been cleared before resuming the request. | 1185 // This should have been cleared before resuming the request. |
| 1187 DCHECK(blocked_by_.empty()); | 1186 DCHECK(blocked_by_.empty()); |
| 1188 if (!calling_delegate_) | 1187 if (!calling_delegate_) |
| 1189 return; | 1188 return; |
| 1190 calling_delegate_ = false; | 1189 calling_delegate_ = false; |
| 1191 net_log_.EndEvent(NetLog::TYPE_URL_REQUEST_DELEGATE); | 1190 net_log_.EndEvent(NetLog::TYPE_URL_REQUEST_DELEGATE); |
| 1192 } | 1191 } |
| 1193 | 1192 |
| 1194 void URLRequest::set_stack_trace(const base::debug::StackTrace& stack_trace) { | |
| 1195 stack_trace_.reset(new base::debug::StackTrace(stack_trace)); | |
| 1196 } | |
| 1197 | |
| 1198 const base::debug::StackTrace* URLRequest::stack_trace() const { | |
| 1199 return stack_trace_.get(); | |
| 1200 } | |
| 1201 | |
| 1202 void URLRequest::GetConnectionAttempts(ConnectionAttempts* out) const { | 1193 void URLRequest::GetConnectionAttempts(ConnectionAttempts* out) const { |
| 1203 if (job_) | 1194 if (job_) |
| 1204 job_->GetConnectionAttempts(out); | 1195 job_->GetConnectionAttempts(out); |
| 1205 else | 1196 else |
| 1206 out->clear(); | 1197 out->clear(); |
| 1207 } | 1198 } |
| 1208 | 1199 |
| 1209 } // namespace net | 1200 } // namespace net |
| OLD | NEW |