Don't have ArcApps load icons from disk cache
The disk cache format (e.g. file names) is really a private implementation detail of the ArcAppListPrefs and ArcAppIcon classes. ArcAppIcon already consults the disk cache. The ArcApps class has been recently changed to use ArcAppIcon's, via an ArcIconOnceLoader. This commit is a small behavior change when the App Service is enabled, if the icon file was already in the cache. Before, there will be no icon ("an empty, transparent rectangle") until the file was decoded. After, there will be a placeholder icon (IDR_APP_DEFAULT_ICON) until the file was decoded. Either way, the "until the file was decoded" time (involving file I/O) can be visible to the naked eye, as a flash of the empty or placeholder icon until the real icon is loaded. But it isn't as long as e.g. the time taken to spin up an Android VM. If the icon file wasn't in the cache, IDR_APP_DEFAULT_ICON would be shown either way. Whether or not the "empty icon before real icon" or "IDR_APP_DEFAULT_ICON before real icon" behavior is preferable, the behavior after this commit (IDR_APP_DEFAULT_ICON) is more consistent when comparing the Android app icon behavior with the App Service enabled or disabled, although when enabled, less consistent when comparing Android and Linux (Crostini) app icon behavior. Anyway, keeping it an ArcAppIcon implementation detail is also arguably cleaner code. It's certainly a little less code (this commit is mostly deletion), and removes a "mapped app id" TODO. BUG=826982 Change-Id: I11f9f5d27061896005def458fe89f890e338e348 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1774005Reviewed-by:Dominick Ng <dominickn@chromium.org> Commit-Queue: Nigel Tao <nigeltao@chromium.org> Cr-Commit-Position: refs/heads/master@{#691854}
Showing
Please register or sign in to comment