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

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

Issue 1041993004: content::ResourceDispatcherHostImpl changes for stale-while-revalidate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@s-w-r-yhirano-patch
Patch Set: Use histograms instead of user actions. Created 5 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
« no previous file with comments | « content/browser/loader/resource_request_info_impl.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "content/browser/frame_host/frame_tree_node.h" 8 #include "content/browser/frame_host/frame_tree_node.h"
9 #include "content/browser/loader/global_routing_id.h" 9 #include "content/browser/loader/global_routing_id.h"
10 #include "content/browser/loader/resource_message_filter.h" 10 #include "content/browser/loader/resource_message_filter.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 false, // has_user_gesture 82 false, // has_user_gesture
83 false, // enable load timing 83 false, // enable load timing
84 request->has_upload(), // enable upload progress 84 request->has_upload(), // enable upload progress
85 false, // do_not_prompt_for_login 85 false, // do_not_prompt_for_login
86 blink::WebReferrerPolicyDefault, // referrer_policy 86 blink::WebReferrerPolicyDefault, // referrer_policy
87 blink::WebPageVisibilityStateVisible, // visibility_state 87 blink::WebPageVisibilityStateVisible, // visibility_state
88 context, // context 88 context, // context
89 base::WeakPtr<ResourceMessageFilter>(), // filter 89 base::WeakPtr<ResourceMessageFilter>(), // filter
90 false, // report_raw_headers 90 false, // report_raw_headers
91 is_async, // is_async 91 is_async, // is_async
92 is_using_lofi); // is_using_lofi 92 is_using_lofi, // is_using_lofi
93 std::string()); // original_headers
93 info->AssociateWithRequest(request); 94 info->AssociateWithRequest(request);
94 } 95 }
95 96
96 // static 97 // static
97 bool ResourceRequestInfo::GetRenderFrameForRequest( 98 bool ResourceRequestInfo::GetRenderFrameForRequest(
98 const net::URLRequest* request, 99 const net::URLRequest* request,
99 int* render_process_id, 100 int* render_process_id,
100 int* render_frame_id) { 101 int* render_frame_id) {
101 URLRequestUserData* user_data = static_cast<URLRequestUserData*>( 102 URLRequestUserData* user_data = static_cast<URLRequestUserData*>(
102 request->GetUserData(URLRequestUserData::kUserDataKey)); 103 request->GetUserData(URLRequestUserData::kUserDataKey));
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 bool has_user_gesture, 143 bool has_user_gesture,
143 bool enable_load_timing, 144 bool enable_load_timing,
144 bool enable_upload_progress, 145 bool enable_upload_progress,
145 bool do_not_prompt_for_login, 146 bool do_not_prompt_for_login,
146 blink::WebReferrerPolicy referrer_policy, 147 blink::WebReferrerPolicy referrer_policy,
147 blink::WebPageVisibilityState visibility_state, 148 blink::WebPageVisibilityState visibility_state,
148 ResourceContext* context, 149 ResourceContext* context,
149 base::WeakPtr<ResourceMessageFilter> filter, 150 base::WeakPtr<ResourceMessageFilter> filter,
150 bool report_raw_headers, 151 bool report_raw_headers,
151 bool is_async, 152 bool is_async,
152 bool is_using_lofi) 153 bool is_using_lofi,
154 const std::string& original_headers)
153 : cross_site_handler_(NULL), 155 : cross_site_handler_(NULL),
154 detachable_handler_(NULL), 156 detachable_handler_(NULL),
155 process_type_(process_type), 157 process_type_(process_type),
156 child_id_(child_id), 158 child_id_(child_id),
157 route_id_(route_id), 159 route_id_(route_id),
158 frame_tree_node_id_(frame_tree_node_id), 160 frame_tree_node_id_(frame_tree_node_id),
159 origin_pid_(origin_pid), 161 origin_pid_(origin_pid),
160 request_id_(request_id), 162 request_id_(request_id),
161 render_frame_id_(render_frame_id), 163 render_frame_id_(render_frame_id),
162 is_main_frame_(is_main_frame), 164 is_main_frame_(is_main_frame),
(...skipping 11 matching lines...) Expand all
174 counted_as_in_flight_request_(false), 176 counted_as_in_flight_request_(false),
175 resource_type_(resource_type), 177 resource_type_(resource_type),
176 transition_type_(transition_type), 178 transition_type_(transition_type),
177 memory_cost_(0), 179 memory_cost_(0),
178 referrer_policy_(referrer_policy), 180 referrer_policy_(referrer_policy),
179 visibility_state_(visibility_state), 181 visibility_state_(visibility_state),
180 context_(context), 182 context_(context),
181 filter_(filter), 183 filter_(filter),
182 report_raw_headers_(report_raw_headers), 184 report_raw_headers_(report_raw_headers),
183 is_async_(is_async), 185 is_async_(is_async),
184 is_using_lofi_(is_using_lofi) { 186 is_using_lofi_(is_using_lofi),
187 original_headers_(original_headers) {
185 } 188 }
186 189
187 ResourceRequestInfoImpl::~ResourceRequestInfoImpl() { 190 ResourceRequestInfoImpl::~ResourceRequestInfoImpl() {
188 } 191 }
189 192
190 ResourceRequestInfo::WebContentsGetter 193 ResourceRequestInfo::WebContentsGetter
191 ResourceRequestInfoImpl::GetWebContentsGetterForRequest() const { 194 ResourceRequestInfoImpl::GetWebContentsGetterForRequest() const {
192 // PlzNavigate: navigation requests are created with a valid FrameTreeNode ID 195 // PlzNavigate: navigation requests are created with a valid FrameTreeNode ID
193 // and invalid RenderProcessHost and RenderFrameHost IDs. The FrameTreeNode 196 // and invalid RenderProcessHost and RenderFrameHost IDs. The FrameTreeNode
194 // ID should be used to access the WebContents. 197 // ID should be used to access the WebContents.
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 base::WeakPtr<ResourceMessageFilter> filter) { 336 base::WeakPtr<ResourceMessageFilter> filter) {
334 child_id_ = child_id; 337 child_id_ = child_id;
335 route_id_ = route_id; 338 route_id_ = route_id;
336 origin_pid_ = origin_pid; 339 origin_pid_ = origin_pid;
337 request_id_ = request_id; 340 request_id_ = request_id;
338 parent_render_frame_id_ = parent_render_frame_id; 341 parent_render_frame_id_ = parent_render_frame_id;
339 filter_ = filter; 342 filter_ = filter;
340 } 343 }
341 344
342 } // namespace content 345 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/resource_request_info_impl.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698