Chromium Code Reviews| 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/browser/loader/resource_dispatcher_host_impl.h" | 7 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
| 8 | 8 |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 | 10 |
| (...skipping 1330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1341 | 1341 |
| 1342 void ResourceDispatcherHostImpl::ContinuePendingBeginRequest( | 1342 void ResourceDispatcherHostImpl::ContinuePendingBeginRequest( |
| 1343 int request_id, | 1343 int request_id, |
| 1344 const ResourceRequest& request_data, | 1344 const ResourceRequest& request_data, |
| 1345 IPC::Message* sync_result, // only valid for sync | 1345 IPC::Message* sync_result, // only valid for sync |
| 1346 int route_id, | 1346 int route_id, |
| 1347 const net::HttpRequestHeaders& headers, | 1347 const net::HttpRequestHeaders& headers, |
| 1348 bool continue_request, | 1348 bool continue_request, |
| 1349 int error_code) { | 1349 int error_code) { |
| 1350 if (!continue_request) { | 1350 if (!continue_request) { |
| 1351 bad_message::ReceivedBadMessage( | 1351 // TODO(ananta): Find a way to specify the right error code here. Passing |
| 1352 filter_, static_cast<bad_message::BadMessageReason>(error_code)); | 1352 // in a non-content error code is not safe. |
|
Charlie Reis
2016/08/10 21:09:50
This is a bad cast, resulting in a collision with
| |
| 1353 bad_message::ReceivedBadMessage(filter_, bad_message::RDH_ILLEGAL_ORIGIN); | |
| 1353 AbortRequestBeforeItStarts(filter_, sync_result, request_id); | 1354 AbortRequestBeforeItStarts(filter_, sync_result, request_id); |
| 1354 return; | 1355 return; |
| 1355 } | 1356 } |
| 1356 | 1357 |
| 1357 int process_type = filter_->process_type(); | 1358 int process_type = filter_->process_type(); |
| 1358 int child_id = filter_->child_id(); | 1359 int child_id = filter_->child_id(); |
| 1359 | 1360 |
| 1360 bool is_navigation_stream_request = | 1361 bool is_navigation_stream_request = |
| 1361 IsBrowserSideNavigationEnabled() && | 1362 IsBrowserSideNavigationEnabled() && |
| 1362 IsResourceTypeFrame(request_data.resource_type); | 1363 IsResourceTypeFrame(request_data.resource_type); |
| (...skipping 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2684 interceptor_info.interceptor.Run(it.name(), it.value(), child_id, | 2685 interceptor_info.interceptor.Run(it.name(), it.value(), child_id, |
| 2685 resource_context, callback); | 2686 resource_context, callback); |
| 2686 return PENDING; | 2687 return PENDING; |
| 2687 } | 2688 } |
| 2688 } | 2689 } |
| 2689 } | 2690 } |
| 2690 return CONTINUE; | 2691 return CONTINUE; |
| 2691 } | 2692 } |
| 2692 | 2693 |
| 2693 } // namespace content | 2694 } // namespace content |
| OLD | NEW |