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 1558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1569 request_data.origin_pid, request_id, request_data.render_frame_id, | 1569 request_data.origin_pid, request_id, request_data.render_frame_id, |
1570 request_data.is_main_frame, request_data.parent_is_main_frame, | 1570 request_data.is_main_frame, request_data.parent_is_main_frame, |
1571 request_data.resource_type, request_data.transition_type, | 1571 request_data.resource_type, request_data.transition_type, |
1572 request_data.should_replace_current_entry, | 1572 request_data.should_replace_current_entry, |
1573 false, // is download | 1573 false, // is download |
1574 false, // is stream | 1574 false, // is stream |
1575 allow_download, request_data.has_user_gesture, | 1575 allow_download, request_data.has_user_gesture, |
1576 request_data.enable_load_timing, request_data.enable_upload_progress, | 1576 request_data.enable_load_timing, request_data.enable_upload_progress, |
1577 do_not_prompt_for_login, request_data.referrer_policy, | 1577 do_not_prompt_for_login, request_data.referrer_policy, |
1578 request_data.visiblity_state, resource_context, filter_->GetWeakPtr(), | 1578 request_data.visiblity_state, resource_context, filter_->GetWeakPtr(), |
1579 report_raw_headers, !is_sync_load, | 1579 report_raw_headers, report_raw_headers, !is_sync_load, |
Charlie Reis
2016/05/11 22:30:23
Why is this passed in twice?
Maybe it would be cl
estark
2016/05/12 00:16:55
Daniel: sorry, I wasn't clear; I was suggesting th
dwaxweiler
2016/05/12 07:28:16
Ah, okay, I will add a comment. Thanks for the exp
| |
1580 IsUsingLoFi(request_data.lofi_state, delegate_, *new_request, | 1580 IsUsingLoFi(request_data.lofi_state, delegate_, *new_request, |
1581 resource_context, | 1581 resource_context, |
1582 request_data.resource_type == RESOURCE_TYPE_MAIN_FRAME), | 1582 request_data.resource_type == RESOURCE_TYPE_MAIN_FRAME), |
1583 support_async_revalidation ? request_data.headers : std::string()); | 1583 support_async_revalidation ? request_data.headers : std::string()); |
1584 // Request takes ownership. | 1584 // Request takes ownership. |
1585 extra_info->AssociateWithRequest(new_request.get()); | 1585 extra_info->AssociateWithRequest(new_request.get()); |
1586 | 1586 |
1587 if (new_request->url().SchemeIs(url::kBlobScheme)) { | 1587 if (new_request->url().SchemeIs(url::kBlobScheme)) { |
1588 // Hang on to a reference to ensure the blob is not released prior | 1588 // Hang on to a reference to ensure the blob is not released prior |
1589 // to the job being started. | 1589 // to the job being started. |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1868 download, // allow_download | 1868 download, // allow_download |
1869 false, // has_user_gesture | 1869 false, // has_user_gesture |
1870 false, // enable_load_timing | 1870 false, // enable_load_timing |
1871 false, // enable_upload_progress | 1871 false, // enable_upload_progress |
1872 false, // do_not_prompt_for_login | 1872 false, // do_not_prompt_for_login |
1873 blink::WebReferrerPolicyDefault, | 1873 blink::WebReferrerPolicyDefault, |
1874 blink::WebPageVisibilityStateVisible, | 1874 blink::WebPageVisibilityStateVisible, |
1875 context, | 1875 context, |
1876 base::WeakPtr<ResourceMessageFilter>(), // filter | 1876 base::WeakPtr<ResourceMessageFilter>(), // filter |
1877 false, // report_raw_headers | 1877 false, // report_raw_headers |
1878 false, // send_extra_certificate_info | |
1878 true, // is_async | 1879 true, // is_async |
1879 false, // is_using_lofi | 1880 false, // is_using_lofi |
1880 std::string()); // original_headers | 1881 std::string()); // original_headers |
1881 } | 1882 } |
1882 | 1883 |
1883 void ResourceDispatcherHostImpl::OnRenderFrameDeleted( | 1884 void ResourceDispatcherHostImpl::OnRenderFrameDeleted( |
1884 const GlobalFrameRoutingId& global_routing_id) { | 1885 const GlobalFrameRoutingId& global_routing_id) { |
1885 CancelRequestsForRoute(global_routing_id); | 1886 CancelRequestsForRoute(global_routing_id); |
1886 } | 1887 } |
1887 | 1888 |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2291 true, // enable_load_timing | 2292 true, // enable_load_timing |
2292 false, // enable_upload_progress | 2293 false, // enable_upload_progress |
2293 false, // do_not_prompt_for_login | 2294 false, // do_not_prompt_for_login |
2294 info.common_params.referrer.policy, | 2295 info.common_params.referrer.policy, |
2295 // TODO(davidben): This is only used for prerenders. Replace | 2296 // TODO(davidben): This is only used for prerenders. Replace |
2296 // is_showing with something for that. Or maybe it just comes from the | 2297 // is_showing with something for that. Or maybe it just comes from the |
2297 // same mechanism as the cookie one. | 2298 // same mechanism as the cookie one. |
2298 blink::WebPageVisibilityStateVisible, resource_context, | 2299 blink::WebPageVisibilityStateVisible, resource_context, |
2299 base::WeakPtr<ResourceMessageFilter>(), // filter | 2300 base::WeakPtr<ResourceMessageFilter>(), // filter |
2300 false, // request_data.report_raw_headers | 2301 false, // request_data.report_raw_headers |
2302 false, | |
Charlie Reis
2016/05/11 22:30:23
Please document this one like the others.
| |
2301 true, // is_async | 2303 true, // is_async |
2302 IsUsingLoFi(info.common_params.lofi_state, delegate_, *new_request, | 2304 IsUsingLoFi(info.common_params.lofi_state, delegate_, *new_request, |
2303 resource_context, info.is_main_frame), | 2305 resource_context, info.is_main_frame), |
2304 // The original_headers field is for stale-while-revalidate but the | 2306 // The original_headers field is for stale-while-revalidate but the |
2305 // feature doesn't work with PlzNavigate, so it's just a placeholder | 2307 // feature doesn't work with PlzNavigate, so it's just a placeholder |
2306 // here. | 2308 // here. |
2307 // TODO(ricea): Make the feature work with stale-while-revalidate | 2309 // TODO(ricea): Make the feature work with stale-while-revalidate |
2308 // and clean this up. | 2310 // and clean this up. |
2309 std::string()); // original_headers | 2311 std::string()); // original_headers |
2310 // Request takes ownership. | 2312 // Request takes ownership. |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2688 ssl.cert_id = GetCertStore()->StoreCert(ssl_info.cert.get(), child_id); | 2690 ssl.cert_id = GetCertStore()->StoreCert(ssl_info.cert.get(), child_id); |
2689 response->head.security_info = SerializeSecurityInfo(ssl); | 2691 response->head.security_info = SerializeSecurityInfo(ssl); |
2690 } | 2692 } |
2691 | 2693 |
2692 CertStore* ResourceDispatcherHostImpl::GetCertStore() { | 2694 CertStore* ResourceDispatcherHostImpl::GetCertStore() { |
2693 return cert_store_for_testing_ ? cert_store_for_testing_ | 2695 return cert_store_for_testing_ ? cert_store_for_testing_ |
2694 : CertStore::GetInstance(); | 2696 : CertStore::GetInstance(); |
2695 } | 2697 } |
2696 | 2698 |
2697 } // namespace content | 2699 } // namespace content |
OLD | NEW |