• Colin Blundell's avatar
    [WebLayer] Package and index subresource filter ruleset data · 92eb8807
    Colin Blundell authored
    This patch extends WebLayer to package and index the subresource
    filter's unindexed ruleset data that is currently pulled into the tree
    at gclient sync. To do so it does the following:
    
    - Packages that data and its manifest as compressed resources in the
      app
    - Has WebLayer kick off indexing as part of startup, using the
      subresource filter component's recently-added ability to read the
      unindexed ruleset data from a resource in the ResourceBundle and
      obtaining the version of the data from the manifest
    
    We note the following:
    - The compressed unindexed data is ~70 KB. The uncompressed data is ~300
      KB. Both of these will slowly grow over time.
    - RulesetService short-circuits out of indexing the data if the content
      version has not changed from that of the last-indexed version
      (saved in prefs), so this operation will have an impact on startup
      only when the unindexed ruleset data changes (which will happen at
      maximum only once with every weblayer app update, and in practice
      presumably less often than that). Nonetheless, to limit impact on
      startup in that case we post the indexing as a BEST_EFFORT task from
      the startup flow. BEST_EFFORT tasks are guaranteed to executee in a
      reasonable delay assuming that the app isn't closed.
    
    At this point in time Chrome is continuing to use the component updater;
    using of the in-tree subresource filter data is done *only* by
    WebLayer.
    
    Bug: 1116095
    Binary-Size: 40K increase due to packaging compressed ruleset data
    Change-Id: Ifeffd6d8fcd223a9783020a97e246dafc69c4276
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2469562Reviewed-by: default avatarCharlie Harrison <csharrison@chromium.org>
    Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
    Reviewed-by: default avatarSami Kyöstilä <skyostil@chromium.org>
    Commit-Queue: Colin Blundell <blundell@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#825333}
    92eb8807
browser_main_parts_impl.cc 11.2 KB