| Index: content/browser/frame_host/navigation_controller_impl.cc
|
| diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc
|
| index 5a9cb08035a7b0a18f427b2f8f229a7b2b1c2177..353f37bb6ccdd7b3690b2fefb655ba2a43e693b6 100644
|
| --- a/content/browser/frame_host/navigation_controller_impl.cc
|
| +++ b/content/browser/frame_host/navigation_controller_impl.cc
|
| @@ -35,6 +35,7 @@
|
| #include "content/public/browser/notification_types.h"
|
| #include "content/public/browser/render_widget_host.h"
|
| #include "content/public/browser/render_widget_host_view.h"
|
| +#include "content/public/browser/session_restore_uma.h"
|
| #include "content/public/browser/storage_partition.h"
|
| #include "content/public/browser/user_metrics.h"
|
| #include "content/public/common/content_client.h"
|
| @@ -1750,8 +1751,24 @@ size_t NavigationControllerImpl::max_entry_count() {
|
| }
|
|
|
| void NavigationControllerImpl::SetActive(bool is_active) {
|
| - if (is_active && needs_reload_)
|
| + if (is_active && needs_reload_) {
|
| + // If the pending navigation is a session restore entry then it is being
|
| + // loaded because of user action, and not automatically by the TabLoader.
|
| + // Consider this a deferred reload that the user then forced to occur.
|
| + // Better session restore tab prioritization should reduce the number of
|
| + // times this occurs.
|
| + NavigationEntryImpl* pending_entry =
|
| + entries_[last_committed_entry_index_].get();
|
| + if (pending_entry->restore_type() == RESTORE_LAST_SESSION_EXITED_CLEANLY ||
|
| + pending_entry->restore_type() == RESTORE_LAST_SESSION_CRASHED) {
|
| + UMA_HISTOGRAM_ENUMERATION(
|
| + content::kSessionRestoreTabActions,
|
| + content::kSessionRestoreTabActionsUma_DeferredTabLoadedByUserAction,
|
| + content::kSessionRestoreTabActionsUma_Max);
|
| + }
|
| +
|
| LoadIfNecessary();
|
| + }
|
| }
|
|
|
| void NavigationControllerImpl::LoadIfNecessary() {
|
|
|