• Duc Bui's avatar
    Keep track of restored-in-foreground tabs. · 7f858a6c
    Duc Bui authored
    Since we want to record UMA for session-restored tabs only when they are
    initially foreground, we need to track restored-in-foreground tabs. This
    CL adds tracking of tabs which are created by session restore and
    initially in foreground.
    
    IsTabRestoredInForeground() API added by this CL will be used in
    SessionRestorePageLoadMetricsObserver to measure FP, FCP and FMP for
    foreground tabs during session restore (http://crrev.com/2930013005/).
    
    started_in_foreground in PageLoadMetricsObserver::OnStart() cannot be
    used to determine whether a tab is initially foreground after it is
    created by session restore or not. For example, when browser-side
    navigation is disabled and a restored tab is created in background,
    switching to it before it loads will yield started_in_foreground as
    true.
    
    Bug: 731901
    Change-Id: I58c6c0330bf6121e78d9d9b9cad72729faeb8885
    Reviewed-on: https://chromium-review.googlesource.com/599507Reviewed-by: default avatarZhen Wang <zhenw@chromium.org>
    Reviewed-by: default avatarFadi Meawad <fmeawad@chromium.org>
    Commit-Queue: Duc Bui <ducbui@google.com>
    Cr-Commit-Position: refs/heads/master@{#491821}
    7f858a6c
tab_manager.h 24.8 KB