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

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

Issue 2316573002: PlzNavigate: Support ResourceTiming API (Closed)
Patch Set: Nit + rebase + build fix 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 common_params_.post_data = nullptr; 257 common_params_.post_data = nullptr;
258 258
259 // Mark time for the Navigation Timing API. 259 // Mark time for the Navigation Timing API.
260 if (request_params_.navigation_timing.redirect_start.is_null()) { 260 if (request_params_.navigation_timing.redirect_start.is_null()) {
261 request_params_.navigation_timing.redirect_start = 261 request_params_.navigation_timing.redirect_start =
262 request_params_.navigation_timing.fetch_start; 262 request_params_.navigation_timing.fetch_start;
263 } 263 }
264 request_params_.navigation_timing.redirect_end = base::TimeTicks::Now(); 264 request_params_.navigation_timing.redirect_end = base::TimeTicks::Now();
265 request_params_.navigation_timing.fetch_start = base::TimeTicks::Now(); 265 request_params_.navigation_timing.fetch_start = base::TimeTicks::Now();
266 266
267 request_params_.redirect_response_infos.push_back(response->head);
268
267 request_params_.redirects.push_back(common_params_.url); 269 request_params_.redirects.push_back(common_params_.url);
268 common_params_.url = redirect_info.new_url; 270 common_params_.url = redirect_info.new_url;
269 common_params_.method = redirect_info.new_method; 271 common_params_.method = redirect_info.new_method;
270 common_params_.referrer.url = GURL(redirect_info.new_referrer); 272 common_params_.referrer.url = GURL(redirect_info.new_referrer);
271 273
272 // TODO(clamy): Have CSP + security upgrade checks here. 274 // TODO(clamy): Have CSP + security upgrade checks here.
273 // TODO(clamy): Kill the renderer if FilterURL fails? 275 // TODO(clamy): Kill the renderer if FilterURL fails?
274 276
275 // It's safe to use base::Unretained because this NavigationRequest owns the 277 // It's safe to use base::Unretained because this NavigationRequest owns the
276 // NavigationHandle where the callback will be stored. 278 // NavigationHandle where the callback will be stored.
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 473
472 TransferNavigationHandleOwnership(render_frame_host); 474 TransferNavigationHandleOwnership(render_frame_host);
473 render_frame_host->CommitNavigation(response_.get(), std::move(body_), 475 render_frame_host->CommitNavigation(response_.get(), std::move(body_),
474 common_params_, request_params_, 476 common_params_, request_params_,
475 is_view_source_); 477 is_view_source_);
476 478
477 frame_tree_node_->ResetNavigationRequest(true); 479 frame_tree_node_->ResetNavigationRequest(true);
478 } 480 }
479 481
480 } // namespace content 482 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/loader/navigation_resource_handler.cc » ('j') | content/common/frame_messages.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698