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

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

Issue 2316573002: PlzNavigate: Support ResourceTiming API (Closed)
Patch Set: Rebase Created 4 years, 2 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
« no previous file with comments | « no previous file | content/browser/loader/navigation_resource_handler.cc » ('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 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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 common_params_.post_data = nullptr; 319 common_params_.post_data = nullptr;
320 320
321 // Mark time for the Navigation Timing API. 321 // Mark time for the Navigation Timing API.
322 if (request_params_.navigation_timing.redirect_start.is_null()) { 322 if (request_params_.navigation_timing.redirect_start.is_null()) {
323 request_params_.navigation_timing.redirect_start = 323 request_params_.navigation_timing.redirect_start =
324 request_params_.navigation_timing.fetch_start; 324 request_params_.navigation_timing.fetch_start;
325 } 325 }
326 request_params_.navigation_timing.redirect_end = base::TimeTicks::Now(); 326 request_params_.navigation_timing.redirect_end = base::TimeTicks::Now();
327 request_params_.navigation_timing.fetch_start = base::TimeTicks::Now(); 327 request_params_.navigation_timing.fetch_start = base::TimeTicks::Now();
328 328
329 request_params_.redirect_response.push_back(response->head);
330
329 request_params_.redirects.push_back(common_params_.url); 331 request_params_.redirects.push_back(common_params_.url);
330 common_params_.url = redirect_info.new_url; 332 common_params_.url = redirect_info.new_url;
331 common_params_.method = redirect_info.new_method; 333 common_params_.method = redirect_info.new_method;
332 common_params_.referrer.url = GURL(redirect_info.new_referrer); 334 common_params_.referrer.url = GURL(redirect_info.new_referrer);
333 335
334 // TODO(clamy): Have CSP + security upgrade checks here. 336 // TODO(clamy): Have CSP + security upgrade checks here.
335 // TODO(clamy): Kill the renderer if FilterURL fails? 337 // TODO(clamy): Kill the renderer if FilterURL fails?
336 338
337 // It's safe to use base::Unretained because this NavigationRequest owns the 339 // It's safe to use base::Unretained because this NavigationRequest owns the
338 // NavigationHandle where the callback will be stored. 340 // NavigationHandle where the callback will be stored.
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 DCHECK_EQ(request_params_.has_user_gesture, begin_params_.has_user_gesture); 559 DCHECK_EQ(request_params_.has_user_gesture, begin_params_.has_user_gesture);
558 560
559 render_frame_host->CommitNavigation(response_.get(), std::move(body_), 561 render_frame_host->CommitNavigation(response_.get(), std::move(body_),
560 common_params_, request_params_, 562 common_params_, request_params_,
561 is_view_source_); 563 is_view_source_);
562 564
563 frame_tree_node_->ResetNavigationRequest(true); 565 frame_tree_node_->ResetNavigationRequest(true);
564 } 566 }
565 567
566 } // namespace content 568 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/loader/navigation_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698