| 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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 navigation_start, entry.GetURL(), entry.restore_type())); | 321 navigation_start, entry.GetURL(), entry.restore_type())); |
| 322 // Create the navigation parameters. | 322 // Create the navigation parameters. |
| 323 // TODO(vitalybuka): Move this before AboutToNavigateRenderFrame once | 323 // TODO(vitalybuka): Move this before AboutToNavigateRenderFrame once |
| 324 // http://crbug.com/408684 is fixed. | 324 // http://crbug.com/408684 is fixed. |
| 325 FrameMsg_Navigate_Type::Value navigation_type = | 325 FrameMsg_Navigate_Type::Value navigation_type = |
| 326 GetNavigationType(controller_->GetBrowserContext(), entry, reload_type); | 326 GetNavigationType(controller_->GetBrowserContext(), entry, reload_type); |
| 327 dest_render_frame_host->Navigate( | 327 dest_render_frame_host->Navigate( |
| 328 entry.ConstructCommonNavigationParams(navigation_type), | 328 entry.ConstructCommonNavigationParams(navigation_type), |
| 329 entry.ConstructStartNavigationParams(), | 329 entry.ConstructStartNavigationParams(), |
| 330 entry.ConstructRequestNavigationParams( | 330 entry.ConstructRequestNavigationParams( |
| 331 navigation_start, | 331 navigation_start, controller_->GetIndexOfEntry(&entry), |
| 332 controller_->GetPendingEntryIndex() == -1, | |
| 333 controller_->GetIndexOfEntry(&entry), | |
| 334 controller_->GetLastCommittedEntryIndex(), | 332 controller_->GetLastCommittedEntryIndex(), |
| 335 controller_->GetEntryCount())); | 333 controller_->GetEntryCount())); |
| 336 } else { | 334 } else { |
| 337 // No need to navigate again. Just resume the deferred request. | 335 // No need to navigate again. Just resume the deferred request. |
| 338 dest_render_frame_host->GetProcess()->ResumeDeferredNavigation( | 336 dest_render_frame_host->GetProcess()->ResumeDeferredNavigation( |
| 339 entry.transferred_global_request_id()); | 337 entry.transferred_global_request_id()); |
| 340 } | 338 } |
| 341 | 339 |
| 342 // Make sure no code called via RFH::Navigate clears the pending entry. | 340 // Make sure no code called via RFH::Navigate clears the pending entry. |
| 343 CHECK_EQ(controller_->GetPendingEntry(), &entry); | 341 CHECK_EQ(controller_->GetPendingEntry(), &entry); |
| (...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 897 "Navigation.TimeToCommit_ExistingRenderer_BeforeUnloadDiscounted", | 895 "Navigation.TimeToCommit_ExistingRenderer_BeforeUnloadDiscounted", |
| 898 time_to_commit); | 896 time_to_commit); |
| 899 UMA_HISTOGRAM_TIMES( | 897 UMA_HISTOGRAM_TIMES( |
| 900 "Navigation.TimeToURLJobStart_ExistingRenderer_BeforeUnloadDiscounted", | 898 "Navigation.TimeToURLJobStart_ExistingRenderer_BeforeUnloadDiscounted", |
| 901 time_to_network); | 899 time_to_network); |
| 902 } | 900 } |
| 903 navigation_data_.reset(); | 901 navigation_data_.reset(); |
| 904 } | 902 } |
| 905 | 903 |
| 906 } // namespace content | 904 } // namespace content |
| OLD | NEW |