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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 | 200 |
201 NavigatorImpl::NavigatorImpl( | 201 NavigatorImpl::NavigatorImpl( |
202 NavigationControllerImpl* navigation_controller, | 202 NavigationControllerImpl* navigation_controller, |
203 NavigatorDelegate* delegate) | 203 NavigatorDelegate* delegate) |
204 : controller_(navigation_controller), | 204 : controller_(navigation_controller), |
205 delegate_(delegate) { | 205 delegate_(delegate) { |
206 } | 206 } |
207 | 207 |
208 NavigatorImpl::~NavigatorImpl() {} | 208 NavigatorImpl::~NavigatorImpl() {} |
209 | 209 |
| 210 // PlzNavigate |
| 211 NavigationRequest* NavigatorImpl::GetNavigationRequestForNodeForTesting( |
| 212 FrameTreeNode* frame_tree_node) { |
| 213 return navigation_request_map_.get(frame_tree_node->frame_tree_node_id()); |
| 214 } |
| 215 |
210 NavigationController* NavigatorImpl::GetController() { | 216 NavigationController* NavigatorImpl::GetController() { |
211 return controller_; | 217 return controller_; |
212 } | 218 } |
213 | 219 |
214 void NavigatorImpl::DidStartProvisionalLoad( | 220 void NavigatorImpl::DidStartProvisionalLoad( |
215 RenderFrameHostImpl* render_frame_host, | 221 RenderFrameHostImpl* render_frame_host, |
216 const GURL& url, | 222 const GURL& url, |
217 bool is_transition_navigation) { | 223 bool is_transition_navigation) { |
218 bool is_error_page = (url.spec() == kUnreachableWebDataURL); | 224 bool is_error_page = (url.spec() == kUnreachableWebDataURL); |
219 bool is_iframe_srcdoc = (url.spec() == kAboutSrcDocURL); | 225 bool is_iframe_srcdoc = (url.spec() == kAboutSrcDocURL); |
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
916 "Navigation.TimeToCommit_ExistingRenderer_BeforeUnloadDiscounted", | 922 "Navigation.TimeToCommit_ExistingRenderer_BeforeUnloadDiscounted", |
917 time_to_commit); | 923 time_to_commit); |
918 UMA_HISTOGRAM_TIMES( | 924 UMA_HISTOGRAM_TIMES( |
919 "Navigation.TimeToURLJobStart_ExistingRenderer_BeforeUnloadDiscounted", | 925 "Navigation.TimeToURLJobStart_ExistingRenderer_BeforeUnloadDiscounted", |
920 time_to_network); | 926 time_to_network); |
921 } | 927 } |
922 navigation_data_.reset(); | 928 navigation_data_.reset(); |
923 } | 929 } |
924 | 930 |
925 } // namespace content | 931 } // namespace content |
OLD | NEW |