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

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

Issue 2764683002: Remove stale-while-revalidate from content and chrome (Closed)
Patch Set: rebase Created 3 years, 9 months 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 #include "content/browser/loader/resource_request_info_impl.h" 5 #include "content/browser/loader/resource_request_info_impl.h"
6 6
7 #include "content/browser/frame_host/frame_tree_node.h" 7 #include "content/browser/frame_host/frame_tree_node.h"
8 #include "content/browser/loader/global_routing_id.h" 8 #include "content/browser/loader/global_routing_id.h"
9 #include "content/browser/loader/resource_message_filter.h" 9 #include "content/browser/loader/resource_message_filter.h"
10 #include "content/browser/web_contents/web_contents_impl.h" 10 #include "content/browser/web_contents/web_contents_impl.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 false, // has_user_gesture 80 false, // has_user_gesture
81 false, // enable load timing 81 false, // enable load timing
82 request->has_upload(), // enable upload progress 82 request->has_upload(), // enable upload progress
83 false, // do_not_prompt_for_login 83 false, // do_not_prompt_for_login
84 blink::WebReferrerPolicyDefault, // referrer_policy 84 blink::WebReferrerPolicyDefault, // referrer_policy
85 blink::WebPageVisibilityStateVisible, // visibility_state 85 blink::WebPageVisibilityStateVisible, // visibility_state
86 context, // context 86 context, // context
87 false, // report_raw_headers 87 false, // report_raw_headers
88 is_async, // is_async 88 is_async, // is_async
89 previews_state, // previews_state 89 previews_state, // previews_state
90 std::string(), // original_headers
91 nullptr, // body 90 nullptr, // body
92 false); // initiated_in_secure_context 91 false); // initiated_in_secure_context
93 info->AssociateWithRequest(request); 92 info->AssociateWithRequest(request);
94 } 93 }
95 94
96 // static 95 // static
97 bool ResourceRequestInfo::GetRenderFrameForRequest( 96 bool ResourceRequestInfo::GetRenderFrameForRequest(
98 const net::URLRequest* request, 97 const net::URLRequest* request,
99 int* render_process_id, 98 int* render_process_id,
100 int* render_frame_id) { 99 int* render_frame_id) {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 bool has_user_gesture, 146 bool has_user_gesture,
148 bool enable_load_timing, 147 bool enable_load_timing,
149 bool enable_upload_progress, 148 bool enable_upload_progress,
150 bool do_not_prompt_for_login, 149 bool do_not_prompt_for_login,
151 blink::WebReferrerPolicy referrer_policy, 150 blink::WebReferrerPolicy referrer_policy,
152 blink::WebPageVisibilityState visibility_state, 151 blink::WebPageVisibilityState visibility_state,
153 ResourceContext* context, 152 ResourceContext* context,
154 bool report_raw_headers, 153 bool report_raw_headers,
155 bool is_async, 154 bool is_async,
156 PreviewsState previews_state, 155 PreviewsState previews_state,
157 const std::string& original_headers,
158 const scoped_refptr<ResourceRequestBodyImpl> body, 156 const scoped_refptr<ResourceRequestBodyImpl> body,
159 bool initiated_in_secure_context) 157 bool initiated_in_secure_context)
160 : detachable_handler_(NULL), 158 : detachable_handler_(NULL),
161 requester_info_(std::move(requester_info)), 159 requester_info_(std::move(requester_info)),
162 route_id_(route_id), 160 route_id_(route_id),
163 frame_tree_node_id_(frame_tree_node_id), 161 frame_tree_node_id_(frame_tree_node_id),
164 origin_pid_(origin_pid), 162 origin_pid_(origin_pid),
165 request_id_(request_id), 163 request_id_(request_id),
166 render_frame_id_(render_frame_id), 164 render_frame_id_(render_frame_id),
167 is_main_frame_(is_main_frame), 165 is_main_frame_(is_main_frame),
(...skipping 10 matching lines...) Expand all
178 counted_as_in_flight_request_(false), 176 counted_as_in_flight_request_(false),
179 resource_type_(resource_type), 177 resource_type_(resource_type),
180 transition_type_(transition_type), 178 transition_type_(transition_type),
181 memory_cost_(0), 179 memory_cost_(0),
182 referrer_policy_(referrer_policy), 180 referrer_policy_(referrer_policy),
183 visibility_state_(visibility_state), 181 visibility_state_(visibility_state),
184 context_(context), 182 context_(context),
185 report_raw_headers_(report_raw_headers), 183 report_raw_headers_(report_raw_headers),
186 is_async_(is_async), 184 is_async_(is_async),
187 previews_state_(previews_state), 185 previews_state_(previews_state),
188 original_headers_(original_headers),
189 body_(body), 186 body_(body),
190 initiated_in_secure_context_(initiated_in_secure_context) {} 187 initiated_in_secure_context_(initiated_in_secure_context) {}
191 188
192 ResourceRequestInfoImpl::~ResourceRequestInfoImpl() { 189 ResourceRequestInfoImpl::~ResourceRequestInfoImpl() {
193 } 190 }
194 191
195 ResourceRequestInfo::WebContentsGetter 192 ResourceRequestInfo::WebContentsGetter
196 ResourceRequestInfoImpl::GetWebContentsGetterForRequest() const { 193 ResourceRequestInfoImpl::GetWebContentsGetterForRequest() const {
197 // PlzNavigate: navigation requests are created with a valid FrameTreeNode ID 194 // PlzNavigate: navigation requests are created with a valid FrameTreeNode ID
198 // and invalid RenderProcessHost and RenderFrameHost IDs. The FrameTreeNode 195 // and invalid RenderProcessHost and RenderFrameHost IDs. The FrameTreeNode
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 on_transfer_.Run(std::move(url_loader_request), 344 on_transfer_.Run(std::move(url_loader_request),
348 std::move(url_loader_client)); 345 std::move(url_loader_client));
349 } 346 }
350 } 347 }
351 348
352 void ResourceRequestInfoImpl::ResetBody() { 349 void ResourceRequestInfoImpl::ResetBody() {
353 body_ = nullptr; 350 body_ = nullptr;
354 } 351 }
355 352
356 } // namespace content 353 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/resource_request_info_impl.h ('k') | content/public/common/content_features.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698