Chromium Code Reviews| Index: content/browser/frame_host/navigator_impl.cc |
| diff --git a/content/browser/frame_host/navigator_impl.cc b/content/browser/frame_host/navigator_impl.cc |
| index ebd10e9739d85a3dbb38636447002fd1893e0df6..8030813fa562001fa5d9aaff3faad60f61b3eb1b 100644 |
| --- a/content/browser/frame_host/navigator_impl.cc |
| +++ b/content/browser/frame_host/navigator_impl.cc |
| @@ -772,6 +772,7 @@ void NavigatorImpl::OnBeginNavigation( |
| navigation_request = scoped_request.get(); |
| navigation_request_map_.set( |
| frame_tree_node->frame_tree_node_id(), scoped_request.Pass()); |
| + navigation_data_.reset(); |
|
davidben
2015/02/02 22:33:57
Does this also need an IsMainFrame guard?
carlosk
2015/02/03 11:00:04
No because here we actually want it to be reset. T
clamy
2015/02/03 12:13:54
I think we should have one for the case where the
carlosk
2015/02/03 12:48:34
You are both right indeed, sorry. Done.
|
| } |
| DCHECK(navigation_request); |
| @@ -833,6 +834,8 @@ void NavigatorImpl::CancelNavigation(FrameTreeNode* frame_tree_node) { |
| CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch( |
| switches::kEnableBrowserSideNavigation)); |
| navigation_request_map_.erase(frame_tree_node->frame_tree_node_id()); |
| + if (frame_tree_node->IsMainFrame()) |
| + navigation_data_.reset(); |
| // TODO(carlosk): move this cleanup into the NavigationRequest destructor once |
| // we properly cancel ongoing navigations. |
| frame_tree_node->render_manager()->CleanUpNavigation(); |
| @@ -944,6 +947,7 @@ void NavigatorImpl::RecordNavigationMetrics( |
| RecordAction(base::UserMetricsAction("FrameLoad")); |
| if (!details.is_main_frame || !navigation_data_ || |
| + navigation_data_->url_job_start_time_.is_null() || |
|
carlosk
2015/01/30 14:01:47
I realized that if for some reason NavigatorImpl::
|
| navigation_data_->url_ != params.original_request_url) { |
| return; |
| } |