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

Side by Side Diff: content/browser/frame_host/navigation_request.cc

Issue 2316573002: PlzNavigate: Support ResourceTiming API (Closed)
Patch Set: Addressed comments (clamy@) Created 4 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/frame_host/navigation_request.h" 5 #include "content/browser/frame_host/navigation_request.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "content/browser/devtools/render_frame_devtools_agent_host.h" 9 #include "content/browser/devtools/render_frame_devtools_agent_host.h"
10 #include "content/browser/frame_host/frame_tree.h" 10 #include "content/browser/frame_host/frame_tree.h"
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 common_params_.post_data = nullptr; 262 common_params_.post_data = nullptr;
263 263
264 // Mark time for the Navigation Timing API. 264 // Mark time for the Navigation Timing API.
265 if (request_params_.navigation_timing.redirect_start.is_null()) { 265 if (request_params_.navigation_timing.redirect_start.is_null()) {
266 request_params_.navigation_timing.redirect_start = 266 request_params_.navigation_timing.redirect_start =
267 request_params_.navigation_timing.fetch_start; 267 request_params_.navigation_timing.fetch_start;
268 } 268 }
269 request_params_.navigation_timing.redirect_end = base::TimeTicks::Now(); 269 request_params_.navigation_timing.redirect_end = base::TimeTicks::Now();
270 request_params_.navigation_timing.fetch_start = base::TimeTicks::Now(); 270 request_params_.navigation_timing.fetch_start = base::TimeTicks::Now();
271 271
272 request_params_.redirect_response_infos.push_back(response->head);
273
272 request_params_.redirects.push_back(common_params_.url); 274 request_params_.redirects.push_back(common_params_.url);
273 common_params_.url = redirect_info.new_url; 275 common_params_.url = redirect_info.new_url;
274 common_params_.method = redirect_info.new_method; 276 common_params_.method = redirect_info.new_method;
275 common_params_.referrer.url = GURL(redirect_info.new_referrer); 277 common_params_.referrer.url = GURL(redirect_info.new_referrer);
276 278
277 // TODO(clamy): Have CSP + security upgrade checks here. 279 // TODO(clamy): Have CSP + security upgrade checks here.
278 // TODO(clamy): Kill the renderer if FilterURL fails? 280 // TODO(clamy): Kill the renderer if FilterURL fails?
279 281
280 // It's safe to use base::Unretained because this NavigationRequest owns the 282 // It's safe to use base::Unretained because this NavigationRequest owns the
281 // NavigationHandle where the callback will be stored. 283 // NavigationHandle where the callback will be stored.
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 462
461 TransferNavigationHandleOwnership(render_frame_host); 463 TransferNavigationHandleOwnership(render_frame_host);
462 render_frame_host->CommitNavigation(response_.get(), std::move(body_), 464 render_frame_host->CommitNavigation(response_.get(), std::move(body_),
463 common_params_, request_params_, 465 common_params_, request_params_,
464 is_view_source_); 466 is_view_source_);
465 467
466 frame_tree_node_->ResetNavigationRequest(true); 468 frame_tree_node_->ResetNavigationRequest(true);
467 } 469 }
468 470
469 } // namespace content 471 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/loader/navigation_resource_handler.cc » ('j') | content/common/navigation_params.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698