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, controller_->GetIndexOfEntry(&entry), | 331 navigation_start, |
| 332 controller_->GetPendingEntryIndex() == -1, |
| 333 controller_->GetIndexOfEntry(&entry), |
332 controller_->GetLastCommittedEntryIndex(), | 334 controller_->GetLastCommittedEntryIndex(), |
333 controller_->GetEntryCount())); | 335 controller_->GetEntryCount())); |
334 } else { | 336 } else { |
335 // No need to navigate again. Just resume the deferred request. | 337 // No need to navigate again. Just resume the deferred request. |
336 dest_render_frame_host->GetProcess()->ResumeDeferredNavigation( | 338 dest_render_frame_host->GetProcess()->ResumeDeferredNavigation( |
337 entry.transferred_global_request_id()); | 339 entry.transferred_global_request_id()); |
338 } | 340 } |
339 | 341 |
340 // Make sure no code called via RFH::Navigate clears the pending entry. | 342 // Make sure no code called via RFH::Navigate clears the pending entry. |
341 CHECK_EQ(controller_->GetPendingEntry(), &entry); | 343 CHECK_EQ(controller_->GetPendingEntry(), &entry); |
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
894 "Navigation.TimeToCommit_ExistingRenderer_BeforeUnloadDiscounted", | 896 "Navigation.TimeToCommit_ExistingRenderer_BeforeUnloadDiscounted", |
895 time_to_commit); | 897 time_to_commit); |
896 UMA_HISTOGRAM_TIMES( | 898 UMA_HISTOGRAM_TIMES( |
897 "Navigation.TimeToURLJobStart_ExistingRenderer_BeforeUnloadDiscounted", | 899 "Navigation.TimeToURLJobStart_ExistingRenderer_BeforeUnloadDiscounted", |
898 time_to_network); | 900 time_to_network); |
899 } | 901 } |
900 navigation_data_.reset(); | 902 navigation_data_.reset(); |
901 } | 903 } |
902 | 904 |
903 } // namespace content | 905 } // namespace content |
OLD | NEW |