Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: content/browser/loader/resource_dispatcher_host_impl.cc

Issue 2572453002: [PlzNavigate] Wire page visibility info to navigation requests (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 2220 matching lines...) Expand 10 before | Expand all | Expand 10 after
2231 // should_replace_current_entry. This was only maintained at layer for 2231 // should_replace_current_entry. This was only maintained at layer for
2232 // request transfers and isn't needed for browser-side navigations. 2232 // request transfers and isn't needed for browser-side navigations.
2233 false, 2233 false,
2234 false, // is download 2234 false, // is download
2235 false, // is stream 2235 false, // is stream
2236 info.common_params.allow_download, 2236 info.common_params.allow_download,
2237 info.common_params.gesture == NavigationGestureUser, 2237 info.common_params.gesture == NavigationGestureUser,
2238 true, // enable_load_timing 2238 true, // enable_load_timing
2239 false, // enable_upload_progress 2239 false, // enable_upload_progress
2240 false, // do_not_prompt_for_login 2240 false, // do_not_prompt_for_login
2241 info.common_params.referrer.policy, 2241 info.common_params.referrer.policy, info.page_visibility_state,
2242 // TODO(davidben): This is only used for prerenders. Replace 2242 resource_context, info.report_raw_headers,
2243 // is_showing with something for that. Or maybe it just comes from the
2244 // same mechanism as the cookie one.
2245 blink::WebPageVisibilityStateVisible, resource_context,
2246 info.report_raw_headers,
2247 true, // is_async 2243 true, // is_async
2248 IsUsingLoFi(info.common_params.lofi_state, delegate_, *new_request, 2244 IsUsingLoFi(info.common_params.lofi_state, delegate_, *new_request,
2249 resource_context, info.is_main_frame), 2245 resource_context, info.is_main_frame),
2250 // The original_headers field is for stale-while-revalidate but the 2246 // The original_headers field is for stale-while-revalidate but the
2251 // feature doesn't work with PlzNavigate, so it's just a placeholder 2247 // feature doesn't work with PlzNavigate, so it's just a placeholder
2252 // here. 2248 // here.
2253 // TODO(ricea): Make the feature work with stale-while-revalidate 2249 // TODO(ricea): Make the feature work with stale-while-revalidate
2254 // and clean this up. 2250 // and clean this up.
2255 std::string(), // original_headers 2251 std::string(), // original_headers
2256 info.common_params.post_data, 2252 info.common_params.post_data,
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
2831 &throttles); 2827 &throttles);
2832 if (!throttles.empty()) { 2828 if (!throttles.empty()) {
2833 handler.reset(new ThrottlingResourceHandler(std::move(handler), request, 2829 handler.reset(new ThrottlingResourceHandler(std::move(handler), request,
2834 std::move(throttles))); 2830 std::move(throttles)));
2835 } 2831 }
2836 } 2832 }
2837 return handler; 2833 return handler;
2838 } 2834 }
2839 2835
2840 } // namespace content 2836 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/navigation_url_loader_unittest.cc ('k') | content/browser/loader/resource_dispatcher_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698