[Local NTP] Add config.js as top-level instead of dynamically added.
To load the NTP faster, we include config.js data in the local ntp page's initial resources instead of later added by local_ntp.js To achieve this, we refactor into the SearchConfigProvider and cache the config data. It will be recomputed on Search provider change. We also now declare the CSP as part of a <meta> tag instead of headers, since in URLDataSource the headers are created on the IO thread and the response on the UI thread. Doing everything in the local_ntp.html response avoids races nicely. Bug: 868432 Change-Id: Iab38ca2b2e032a58c2d404938065a612b08cc69a Reviewed-on: https://chromium-review.googlesource.com/1154687Reviewed-by:Chris Palmer <palmer@chromium.org> Reviewed-by:
Marc Treib <treib@chromium.org> Commit-Queue: Mathieu Perreault <mathp@chromium.org> Cr-Commit-Position: refs/heads/master@{#579553}
Showing
This diff is collapsed.
Please register or sign in to comment