Add DIR_ASSETS in base::PathService |
||
Issue description
Currently DIR_MODULE is used when loading assets such as ICU data or .pak files. On some platforms these files are stored in a separate directory. Android and Fuchsia solve this problem with DIR_ANDROID_APP_DATA and DIR_FUCHSIA_RESOURCE. This approach doesn't scale well because it requires adding platform-specific ifdefs when loading asset files, and this defeats the purpose of base::PathServer.
The proposal is to add cross-platform DIR_ASSETS that can be used on all
platforms. The values is platform specific:
Win/Linux/ChromeOS: DIR_ASSETS = DIR_MODULE
Mac: DIR_ASSETS = <bundle_path>/Resources
or DIR_MODULE when not bundled.
Android: DIR_ASSETS = DIR_ANDROID_APP_DATA
Fuchsia: DIR_ASSETS = DIR_FUCHSIA_RESOURCE
or DIR_MODULE when not packaged.
DIR_ANDROID_APP_DATA and DIR_FUCHSIA_RESOURCE should be removed.
,
Jun 18 2018
,
Jun 18 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/dadea69ae5098c061fe2c64971b27fe0cb4d57f7 commit dadea69ae5098c061fe2c64971b27fe0cb4d57f7 Author: Sergey Ulanov <sergeyu@chromium.org> Date: Mon Jun 18 20:43:44 2018 Chromecast: Use DIR_ASSETS instead of DIR_MODULE to locate resources. DIR_MODULE should not be used to discover resource files on Fuchsia. Replaced it with DIR_ASSETS. This fixes resource loading on Fuchsia, but has no effect on other platforms. Change-Id: Ia0d235a4d07dc2f3e6bcd905a401ede113998e8e Bug: 805727 Reviewed-on: https://chromium-review.googlesource.com/1100377 Reviewed-by: Sergey Volk <servolk@chromium.org> Commit-Queue: Sergey Ulanov <sergeyu@chromium.org> Cr-Commit-Position: refs/heads/master@{#568147} [modify] https://crrev.com/dadea69ae5098c061fe2c64971b27fe0cb4d57f7/chromecast/base/cast_paths.cc [modify] https://crrev.com/dadea69ae5098c061fe2c64971b27fe0cb4d57f7/chromecast/common/cast_resource_delegate.cc |
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, Feb 7 2018