| 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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading | 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading |
| 6 | 6 |
| 7 #include "content/child/resource_dispatcher.h" | 7 #include "content/child/resource_dispatcher.h" |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 | 419 |
| 420 // The request ID will be removed from our pending list in the destructor. | 420 // The request ID will be removed from our pending list in the destructor. |
| 421 // Normally, dispatching this message causes the reference-counted request to | 421 // Normally, dispatching this message causes the reference-counted request to |
| 422 // die immediately. | 422 // die immediately. |
| 423 // TODO(kinuko): Revisit here. This probably needs to call request_info->peer | 423 // TODO(kinuko): Revisit here. This probably needs to call request_info->peer |
| 424 // but the past attempt to change it seems to have caused crashes. | 424 // but the past attempt to change it seems to have caused crashes. |
| 425 // (crbug.com/547047) | 425 // (crbug.com/547047) |
| 426 peer->OnCompletedRequest(request_complete_data.error_code, | 426 peer->OnCompletedRequest(request_complete_data.error_code, |
| 427 request_complete_data.was_ignored_by_handler, | 427 request_complete_data.was_ignored_by_handler, |
| 428 request_complete_data.exists_in_cache, | 428 request_complete_data.exists_in_cache, |
| 429 request_complete_data.security_info, | |
| 430 renderer_completion_time, | 429 renderer_completion_time, |
| 431 request_complete_data.encoded_data_length); | 430 request_complete_data.encoded_data_length); |
| 432 } | 431 } |
| 433 | 432 |
| 434 bool ResourceDispatcher::RemovePendingRequest(int request_id) { | 433 bool ResourceDispatcher::RemovePendingRequest(int request_id) { |
| 435 PendingRequestMap::iterator it = pending_requests_.find(request_id); | 434 PendingRequestMap::iterator it = pending_requests_.find(request_id); |
| 436 if (it == pending_requests_.end()) | 435 if (it == pending_requests_.end()) |
| 437 return false; | 436 return false; |
| 438 | 437 |
| 439 PendingRequestInfo* request_info = it->second.get(); | 438 PendingRequestInfo* request_info = it->second.get(); |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 874 *frame_origin = extra_data->frame_origin(); | 873 *frame_origin = extra_data->frame_origin(); |
| 875 return request; | 874 return request; |
| 876 } | 875 } |
| 877 | 876 |
| 878 void ResourceDispatcher::SetResourceSchedulingFilter( | 877 void ResourceDispatcher::SetResourceSchedulingFilter( |
| 879 scoped_refptr<ResourceSchedulingFilter> resource_scheduling_filter) { | 878 scoped_refptr<ResourceSchedulingFilter> resource_scheduling_filter) { |
| 880 resource_scheduling_filter_ = resource_scheduling_filter; | 879 resource_scheduling_filter_ = resource_scheduling_filter; |
| 881 } | 880 } |
| 882 | 881 |
| 883 } // namespace content | 882 } // namespace content |
| OLD | NEW |