• Tommy C. Li's avatar
    Omnibox: Expose IsSecurityInfoInitialized() method in LocationBarModel · e13a84b7
    Tommy C. Li authored
    For Query in Omnibox, we want to avoid the URL flicker while the page
    is navigating and the TLS security state has not been initialized.
    
    This currently works on Android implementation by toggling a boolean
    flag on navigation and TLS state update.
    
    However, this duplicates a piece of state that's already
    authoritatively stored within the VisibleSecurityState.
    
    This CL:
    
     1. Exposes an IsSecurityInfoInitialized() method on LocationBarModel
    
     2. Updates the security_state::SecurityInfo struct to add a
        connection_info_initialized flag that's already present in
        security_state::VisibleSecurityState.
    
     3. Updates LocationBarModelDelegate to provide a general
        GetSecurityInfo method.
    
    Planned followup work:
    
     1. Make Query in Omnibox actually use the IsSecurityInfoInitialized
        flag.
    
     2. Use LocationBarModelDelegate::GetSecurityInfo to remove some
        now-redundant methods such as FailsBillingCheck and
        FailsMalwareCheck.
    
    Bug: 874592
    Change-Id: I648b30859ec40bb741de1c31378e0a6cd8baeeaa
    Reviewed-on: https://chromium-review.googlesource.com/c/1324879Reviewed-by: default avatarAdrienne Porter Felt <felt@chromium.org>
    Reviewed-by: default avatarChristopher Thompson <cthomp@chromium.org>
    Reviewed-by: default avatarScott Violet <sky@chromium.org>
    Commit-Queue: Tommy Li <tommycli@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#607296}
    e13a84b7
location_bar_model_impl.cc 8.12 KB