commit | 5dd9513f5c3838274dc7a5aa91cc163302883228 | [log] [tgz] |
---|---|---|
author | Hiroshige Hayashizaki <hiroshige@chromium.org> | Wed Mar 06 21:46:50 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Mar 06 21:46:50 2019 |
tree | d0a590761c8c8d6be16c71247624804ea4a34204 | |
parent | 999fbba8c74b7b9ab3518194d5a63a71f4b79af9 [diff] |
[Layered API] Implement origin trials: BuiltInModuleKvStorage This CL adds origin_trial_feature_name to - "BuiltInModuleInfra" - "BuiltInModuleKvStorage" While "BuiltInModuleInfra" origin trial is not needed for end users, this is needed in terms of implementation, because "BuiltInModuleInfra" should be enabled if "BuiltInModuleKvStorage" is enabled, and thus "BuiltInModuleInfra" flag should also depend on origin trials. By adding origin_trial_feature_name to "BuiltInModuleInfra", origin_trials::BuiltInModuleInfraEnabled() takes care of the dependency. As origin trials requires ExecutionContext, this CL associates built-in module feature control with Modulator, by introducing - Modulator::BuiltInModuleInfraEnabled() - Modulator::BuiltInModuleEnabled() This CL plumbs Modulator via ModuleScriptFetcher::Fetch() and ImportMap, to plumb Modulator::BuiltInModule*Enabled() to layered_api.cc. It seems a little confusing that ModuleScriptFetcher takes both Modulator and ResourceFetcher that refer module map settings object and fetch client settings object, respectively. This is actually consistent, because built-in modules are associated with module map settings object and the current implementation of import maps is also associated with Modulator (crbug/928435), while fetching should refer to fetch client settings object. This apparent inconsistency should be resolved by - Fixing Issue 928435, or - Enabling Built-in modules by default (which will remove dependencies to ExecutionContext/Modulator again), or - Refactoring ModuleScriptFetcher. This CL implements individual control over built-in modules in ModulatorImplBase::BuiltInModuleEnabled(). After this CL, - "BuiltInModuleKvStorage" enables "kv-storage" and "blank" only, and - "BuiltInModuleInfra" flag enables "blank" only, while they enabled all built-in modules before this CL. Bug: 829084, 928435 Change-Id: I0ee2838c0981192e9a993cb784bc39d866682836 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1497468 Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> Reviewed-by: Kouhei Ueno <kouhei@chromium.org> Cr-Commit-Position: refs/heads/master@{#638289}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .