| 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 2179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2190 -1, // request_data.origin_pid, | 2190 -1, // request_data.origin_pid, |
| 2191 MakeRequestID(), | 2191 MakeRequestID(), |
| 2192 -1, // request_data.render_frame_id, | 2192 -1, // request_data.render_frame_id, |
| 2193 info.is_main_frame, info.parent_is_main_frame, resource_type, | 2193 info.is_main_frame, info.parent_is_main_frame, resource_type, |
| 2194 info.common_params.transition, | 2194 info.common_params.transition, |
| 2195 // should_replace_current_entry. This was only maintained at layer for | 2195 // should_replace_current_entry. This was only maintained at layer for |
| 2196 // request transfers and isn't needed for browser-side navigations. | 2196 // request transfers and isn't needed for browser-side navigations. |
| 2197 false, | 2197 false, |
| 2198 false, // is download | 2198 false, // is download |
| 2199 false, // is stream | 2199 false, // is stream |
| 2200 info.common_params.allow_download, info.begin_params.has_user_gesture, | 2200 info.common_params.allow_download, |
| 2201 info.common_params.gesture == NavigationGestureUser, |
| 2201 true, // enable_load_timing | 2202 true, // enable_load_timing |
| 2202 false, // enable_upload_progress | 2203 false, // enable_upload_progress |
| 2203 false, // do_not_prompt_for_login | 2204 false, // do_not_prompt_for_login |
| 2204 info.common_params.referrer.policy, | 2205 info.common_params.referrer.policy, |
| 2205 // TODO(davidben): This is only used for prerenders. Replace | 2206 // TODO(davidben): This is only used for prerenders. Replace |
| 2206 // is_showing with something for that. Or maybe it just comes from the | 2207 // is_showing with something for that. Or maybe it just comes from the |
| 2207 // same mechanism as the cookie one. | 2208 // same mechanism as the cookie one. |
| 2208 blink::WebPageVisibilityStateVisible, resource_context, | 2209 blink::WebPageVisibilityStateVisible, resource_context, |
| 2209 base::WeakPtr<ResourceMessageFilter>(), // filter | 2210 base::WeakPtr<ResourceMessageFilter>(), // filter |
| 2210 info.report_raw_headers, | 2211 info.report_raw_headers, |
| 2211 true, // is_async | 2212 true, // is_async |
| 2212 IsUsingLoFi(info.common_params.lofi_state, delegate_, *new_request, | 2213 IsUsingLoFi(info.common_params.lofi_state, delegate_, *new_request, |
| 2213 resource_context, info.is_main_frame), | 2214 resource_context, info.is_main_frame), |
| 2214 // The original_headers field is for stale-while-revalidate but the | 2215 // The original_headers field is for stale-while-revalidate but the |
| 2215 // feature doesn't work with PlzNavigate, so it's just a placeholder | 2216 // feature doesn't work with PlzNavigate, so it's just a placeholder |
| 2216 // here. | 2217 // here. |
| 2217 // TODO(ricea): Make the feature work with stale-while-revalidate | 2218 // TODO(ricea): Make the feature work with stale-while-revalidate |
| 2218 // and clean this up. | 2219 // and clean this up. |
| 2219 std::string(), // original_headers | 2220 std::string(), // original_headers |
| 2220 info.common_params.post_data, | 2221 info.common_params.post_data, |
| 2221 // TODO(mek): Currently initiated_in_secure_context is only used for | 2222 // TODO(mek): Currently initiated_in_secure_context is only used for |
| (...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2800 &throttles); | 2801 &throttles); |
| 2801 if (!throttles.empty()) { | 2802 if (!throttles.empty()) { |
| 2802 handler.reset(new ThrottlingResourceHandler(std::move(handler), request, | 2803 handler.reset(new ThrottlingResourceHandler(std::move(handler), request, |
| 2803 std::move(throttles))); | 2804 std::move(throttles))); |
| 2804 } | 2805 } |
| 2805 } | 2806 } |
| 2806 return handler; | 2807 return handler; |
| 2807 } | 2808 } |
| 2808 | 2809 |
| 2809 } // namespace content | 2810 } // namespace content |
| OLD | NEW |