Move out load of bundled assistant proto to the component updater
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:François Doray <fdoray@chromium.org> Reviewed-by:
Sorin Jianu <sorin@chromium.org> Reviewed-by:
Mustafa Emre Acer <meacer@chromium.org> Cr-Commit-Position: refs/heads/master@{#597109}
Showing
This diff is collapsed.
Please register or sign in to comment