• Justin Cohen's avatar
    [ios] Fix kRestoreNavigationTime histogram. · 949f7d47
    Justin Cohen authored
    kRestoreNavigationTime was a timer created by WKBasedNavigationManagerImpl::Restore
    and stopped when session restoration begins navigating to its final URL.
    
    Unfortunately, WKBasedNavigationManagerImpl::Restore is called for every restored
    WebState on startup.  Actual network access doesn't happen until a tab is selected. That
    means if you have 10 tabs, background/kill/restore, navigate a bit, and then change tabs,
    that second tab will have had a timer running since the app started.
    
    Instead, start kRestoreNavigationTime when ios/web begins loading the restore page, and
    finish the timer when ios/web begins loading the real page.  This should more correctly
    tell how much time SlimNav restoration adds.
    
    Bug: 1005044
    Change-Id: I35fee36bb50ec627d7455d6215669a92a2b4bc6e
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1808355
    Auto-Submit: Justin Cohen <justincohen@chromium.org>
    Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
    Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
    Commit-Queue: Justin Cohen <justincohen@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#697757}
    949f7d47
legacy_navigation_manager_impl.h 4.31 KB