| 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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 | 408 |
| 409 // Make sure no code called via RFHM::Navigate clears the pending entry. | 409 // Make sure no code called via RFHM::Navigate clears the pending entry. |
| 410 CHECK_EQ(controller_->GetPendingEntry(), &entry); | 410 CHECK_EQ(controller_->GetPendingEntry(), &entry); |
| 411 | 411 |
| 412 // For security, we should never send non-Web-UI URLs to a Web UI renderer. | 412 // For security, we should never send non-Web-UI URLs to a Web UI renderer. |
| 413 // Double check that here. | 413 // Double check that here. |
| 414 CheckWebUIRendererDoesNotDisplayNormalURL( | 414 CheckWebUIRendererDoesNotDisplayNormalURL( |
| 415 dest_render_frame_host, entry.GetURL()); | 415 dest_render_frame_host, entry.GetURL()); |
| 416 | 416 |
| 417 // Notify observers that we will navigate in this RenderFrame. | 417 // Notify observers that we will navigate in this RenderFrame. |
| 418 if (delegate_) | 418 if (delegate_) { |
| 419 delegate_->AboutToNavigateRenderFrame(dest_render_frame_host); | 419 delegate_->AboutToNavigateRenderFrame(render_frame_host, |
| 420 dest_render_frame_host); |
| 421 } |
| 420 | 422 |
| 421 // Create the navigation parameters. | 423 // Create the navigation parameters. |
| 422 // TODO(vitalybuka): Move this before AboutToNavigateRenderFrame once | 424 // TODO(vitalybuka): Move this before AboutToNavigateRenderFrame once |
| 423 // http://crbug.com/408684 is fixed. | 425 // http://crbug.com/408684 is fixed. |
| 424 FrameMsg_Navigate_Params navigate_params; | 426 FrameMsg_Navigate_Params navigate_params; |
| 425 MakeNavigateParams( | 427 MakeNavigateParams( |
| 426 entry, controller_, reload_type, navigation_start, &navigate_params); | 428 entry, controller_, reload_type, navigation_start, &navigate_params); |
| 427 | 429 |
| 428 // Navigate in the desired RenderFrameHost. | 430 // Navigate in the desired RenderFrameHost. |
| 429 // We can skip this step in the rare case that this is a transfer navigation | 431 // We can skip this step in the rare case that this is a transfer navigation |
| (...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 970 "Navigation.TimeToCommit_ExistingRenderer_BeforeUnloadDiscounted", | 972 "Navigation.TimeToCommit_ExistingRenderer_BeforeUnloadDiscounted", |
| 971 time_to_commit); | 973 time_to_commit); |
| 972 UMA_HISTOGRAM_TIMES( | 974 UMA_HISTOGRAM_TIMES( |
| 973 "Navigation.TimeToURLJobStart_ExistingRenderer_BeforeUnloadDiscounted", | 975 "Navigation.TimeToURLJobStart_ExistingRenderer_BeforeUnloadDiscounted", |
| 974 time_to_network); | 976 time_to_network); |
| 975 } | 977 } |
| 976 navigation_data_.reset(); | 978 navigation_data_.reset(); |
| 977 } | 979 } |
| 978 | 980 |
| 979 } // namespace content | 981 } // namespace content |
| OLD | NEW |