| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/navigator_impl.h" | 5 #include "content/browser/frame_host/navigator_impl.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "content/browser/frame_host/frame_tree.h" | 10 #include "content/browser/frame_host/frame_tree.h" |
| (...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 729 navigation_request_map_.erase(frame_tree_node->frame_tree_node_id()); | 729 navigation_request_map_.erase(frame_tree_node->frame_tree_node_id()); |
| 730 if (frame_tree_node->IsMainFrame()) | 730 if (frame_tree_node->IsMainFrame()) |
| 731 navigation_data_.reset(); | 731 navigation_data_.reset(); |
| 732 // TODO(carlosk): move this cleanup into the NavigationRequest destructor once | 732 // TODO(carlosk): move this cleanup into the NavigationRequest destructor once |
| 733 // we properly cancel ongoing navigations. | 733 // we properly cancel ongoing navigations. |
| 734 frame_tree_node->render_manager()->CleanUpNavigation(); | 734 frame_tree_node->render_manager()->CleanUpNavigation(); |
| 735 } | 735 } |
| 736 | 736 |
| 737 // PlzNavigate | 737 // PlzNavigate |
| 738 NavigationRequest* NavigatorImpl::GetNavigationRequestForNodeForTesting( | 738 NavigationRequest* NavigatorImpl::GetNavigationRequestForNodeForTesting( |
| 739 FrameTreeNode* frame_tree_node) { | 739 int64 frame_tree_node_id) { |
| 740 return navigation_request_map_.get(frame_tree_node->frame_tree_node_id()); | 740 return navigation_request_map_.get(frame_tree_node_id); |
| 741 } | 741 } |
| 742 | 742 |
| 743 bool NavigatorImpl::IsWaitingForBeforeUnloadACK( | 743 bool NavigatorImpl::IsWaitingForBeforeUnloadACK( |
| 744 FrameTreeNode* frame_tree_node) { | 744 FrameTreeNode* frame_tree_node) { |
| 745 CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch( | 745 CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 746 switches::kEnableBrowserSideNavigation)); | 746 switches::kEnableBrowserSideNavigation)); |
| 747 NavigationRequest* request = | 747 NavigationRequest* request = |
| 748 navigation_request_map_.get(frame_tree_node->frame_tree_node_id()); | 748 navigation_request_map_.get(frame_tree_node->frame_tree_node_id()); |
| 749 if (!request) | 749 if (!request) |
| 750 return false; | 750 return false; |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 891 "Navigation.TimeToCommit_ExistingRenderer_BeforeUnloadDiscounted", | 891 "Navigation.TimeToCommit_ExistingRenderer_BeforeUnloadDiscounted", |
| 892 time_to_commit); | 892 time_to_commit); |
| 893 UMA_HISTOGRAM_TIMES( | 893 UMA_HISTOGRAM_TIMES( |
| 894 "Navigation.TimeToURLJobStart_ExistingRenderer_BeforeUnloadDiscounted", | 894 "Navigation.TimeToURLJobStart_ExistingRenderer_BeforeUnloadDiscounted", |
| 895 time_to_network); | 895 time_to_network); |
| 896 } | 896 } |
| 897 navigation_data_.reset(); | 897 navigation_data_.reset(); |
| 898 } | 898 } |
| 899 | 899 |
| 900 } // namespace content | 900 } // namespace content |
| OLD | NEW |