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 "content/browser/renderer_host/async_resource_handler.h" | 5 #include "content/browser/renderer_host/async_resource_handler.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/debug/alias.h" | 10 #include "base/debug/alias.h" |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 int request_id, | 281 int request_id, |
282 const net::URLRequestStatus& status, | 282 const net::URLRequestStatus& status, |
283 const std::string& security_info) { | 283 const std::string& security_info) { |
284 // If we crash here, figure out what URL the renderer was requesting. | 284 // If we crash here, figure out what URL the renderer was requesting. |
285 // http://crbug.com/107692 | 285 // http://crbug.com/107692 |
286 char url_buf[128]; | 286 char url_buf[128]; |
287 base::strlcpy(url_buf, request_->url().spec().c_str(), arraysize(url_buf)); | 287 base::strlcpy(url_buf, request_->url().spec().c_str(), arraysize(url_buf)); |
288 base::debug::Alias(url_buf); | 288 base::debug::Alias(url_buf); |
289 | 289 |
290 TimeTicks completion_time = TimeTicks::Now(); | 290 TimeTicks completion_time = TimeTicks::Now(); |
| 291 const ResourceRequestInfoImpl* info = |
| 292 ResourceRequestInfoImpl::ForRequest(request_); |
291 filter_->Send(new ResourceMsg_RequestComplete(routing_id_, | 293 filter_->Send(new ResourceMsg_RequestComplete(routing_id_, |
292 request_id, | 294 request_id, |
293 status, | 295 status, |
| 296 info->handled_externally(), |
294 security_info, | 297 security_info, |
295 completion_time)); | 298 completion_time)); |
296 | 299 |
297 // If we still have a read buffer, then see about caching it for later... | 300 // If we still have a read buffer, then see about caching it for later... |
298 // Note that we have to make sure the buffer is not still being used, so we | 301 // Note that we have to make sure the buffer is not still being used, so we |
299 // have to perform an explicit check on the status code. | 302 // have to perform an explicit check on the status code. |
300 if (g_spare_read_buffer || | 303 if (g_spare_read_buffer || |
301 net::URLRequestStatus::SUCCESS != status.status()) { | 304 net::URLRequestStatus::SUCCESS != status.status()) { |
302 read_buffer_ = NULL; | 305 read_buffer_ = NULL; |
303 } else if (read_buffer_.get()) { | 306 } else if (read_buffer_.get()) { |
(...skipping 26 matching lines...) Expand all Loading... |
330 } | 333 } |
331 | 334 |
332 void AsyncResourceHandler::ResumeIfDeferred() { | 335 void AsyncResourceHandler::ResumeIfDeferred() { |
333 if (did_defer_) { | 336 if (did_defer_) { |
334 did_defer_ = false; | 337 did_defer_ = false; |
335 controller()->Resume(); | 338 controller()->Resume(); |
336 } | 339 } |
337 } | 340 } |
338 | 341 |
339 } // namespace content | 342 } // namespace content |
OLD | NEW |