• Siddhartha's avatar
    Move out load of bundled assistant proto to the component updater · df6d3858
    Siddhartha authored
    This CL is moving lifting out the loading from the resource bundle to
    the corresponding 'ssl_error_assistant_component'.
    
    The previous implementation was loading on-demand the bundled proto
    when needed. But, when the 'ssl_error_assistant_component' is ready, it's
    setting the received proto. As no SSL error occured, the bundled proto is
    not loaded and must be loaded on the UI thread.
    
    This is causing jank on the UI thread. Which can be seen on the bug 888555.
    
    The current proposition is to keep the bundle loading on-demand since
    error paths are not the common ones. But, for the
    'ssl_error_assistant_component' path we proposed to also read the bundled
    proto and choose the most recent one before sending it to the error
    assistant on the UI thread.
    
    That way, most of the job is done before getting on the UI thread.
    
    NOTE: ReadErrorAssistantProtoFromResourceBundle is thread safe and can be
    executed on any thread. It can also be executed twice.
    
    R=fdoray@chromium.org, meacer@chromium.org
    CC=carlosil@chromium.org, agl@chromium.org
    
    Bug: 888555
    Change-Id: Icd994f93c849b3c4d8b01d7921dff69f571397a8
    Reviewed-on: https://chromium-review.googlesource.com/c/1247025
    Commit-Queue: Etienne Bergeron <etienneb@chromium.org>
    Reviewed-by: default avatarFrançois Doray <fdoray@chromium.org>
    Reviewed-by: default avatarSorin Jianu <sorin@chromium.org>
    Reviewed-by: default avatarMustafa Emre Acer <meacer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#597109}
    df6d3858
ssl_browsertest.cc 328 KB