[App Service] Get file path in a background thread.

ExtensionResource::GetFilePath will DCHECK if it's not called on a background
thread. Currently, the App Service calls this method on the UI thread, which
causes App Management to crash when DCHECKs are enabled.

This CL refactors apps::LoadIconFromExtension to ensure that this method is
only called on a background thread.

Bug: 916380
Change-Id: I3ba8757e884c6336b4b7b61fc46363c8273fcc86
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1619586
Reviewed-by: Nigel Tao <nigeltao@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Commit-Queue: Jeevan Shikaram <jshikaram@chromium.org>
Cr-Commit-Position: refs/heads/master@{#662061}
1 file changed