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 2193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2204 -1, // request_data.origin_pid, | 2204 -1, // request_data.origin_pid, |
2205 MakeRequestID(), | 2205 MakeRequestID(), |
2206 -1, // request_data.render_frame_id, | 2206 -1, // request_data.render_frame_id, |
2207 info.is_main_frame, info.parent_is_main_frame, resource_type, | 2207 info.is_main_frame, info.parent_is_main_frame, resource_type, |
2208 info.common_params.transition, | 2208 info.common_params.transition, |
2209 // should_replace_current_entry. This was only maintained at layer for | 2209 // should_replace_current_entry. This was only maintained at layer for |
2210 // request transfers and isn't needed for browser-side navigations. | 2210 // request transfers and isn't needed for browser-side navigations. |
2211 false, | 2211 false, |
2212 false, // is download | 2212 false, // is download |
2213 false, // is stream | 2213 false, // is stream |
2214 info.common_params.allow_download, info.begin_params.has_user_gesture, | 2214 info.common_params.allow_download, |
| 2215 info.begin_params.gesture == NavigationGestureUser, |
2215 true, // enable_load_timing | 2216 true, // enable_load_timing |
2216 false, // enable_upload_progress | 2217 false, // enable_upload_progress |
2217 false, // do_not_prompt_for_login | 2218 false, // do_not_prompt_for_login |
2218 info.common_params.referrer.policy, | 2219 info.common_params.referrer.policy, |
2219 // TODO(davidben): This is only used for prerenders. Replace | 2220 // TODO(davidben): This is only used for prerenders. Replace |
2220 // is_showing with something for that. Or maybe it just comes from the | 2221 // is_showing with something for that. Or maybe it just comes from the |
2221 // same mechanism as the cookie one. | 2222 // same mechanism as the cookie one. |
2222 blink::WebPageVisibilityStateVisible, resource_context, | 2223 blink::WebPageVisibilityStateVisible, resource_context, |
2223 base::WeakPtr<ResourceMessageFilter>(), // filter | 2224 base::WeakPtr<ResourceMessageFilter>(), // filter |
2224 info.report_raw_headers, | 2225 info.report_raw_headers, |
2225 true, // is_async | 2226 true, // is_async |
2226 IsUsingLoFi(info.common_params.lofi_state, delegate_, *new_request, | 2227 IsUsingLoFi(info.common_params.lofi_state, delegate_, *new_request, |
2227 resource_context, info.is_main_frame), | 2228 resource_context, info.is_main_frame), |
2228 // The original_headers field is for stale-while-revalidate but the | 2229 // The original_headers field is for stale-while-revalidate but the |
2229 // feature doesn't work with PlzNavigate, so it's just a placeholder | 2230 // feature doesn't work with PlzNavigate, so it's just a placeholder |
2230 // here. | 2231 // here. |
2231 // TODO(ricea): Make the feature work with stale-while-revalidate | 2232 // TODO(ricea): Make the feature work with stale-while-revalidate |
2232 // and clean this up. | 2233 // and clean this up. |
2233 std::string(), // original_headers | 2234 std::string(), // original_headers |
2234 info.common_params.post_data, | 2235 info.common_params.post_data, |
2235 // TODO(mek): Currently initiated_in_secure_context is only used for | 2236 // TODO(mek): Currently initiated_in_secure_context is only used for |
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2791 &throttles); | 2792 &throttles); |
2792 if (!throttles.empty()) { | 2793 if (!throttles.empty()) { |
2793 handler.reset(new ThrottlingResourceHandler(std::move(handler), request, | 2794 handler.reset(new ThrottlingResourceHandler(std::move(handler), request, |
2794 std::move(throttles))); | 2795 std::move(throttles))); |
2795 } | 2796 } |
2796 } | 2797 } |
2797 return handler; | 2798 return handler; |
2798 } | 2799 } |
2799 | 2800 |
2800 } // namespace content | 2801 } // namespace content |
OLD | NEW |