• Karan Bhatia's avatar
    Declarative Web Request: Only register default web request rules registries if needed. · 4f46cc0e
    Karan Bhatia authored
    Currently we create default web request rules registries for the declarative web
    request API even if the API is not available to the current environment. This is
    wasteful and detrimental to performance, since the initial registry load blocks
    the first network request (tracked via Extensions.NetworkDelayRegistryLoad UMA).
    
    This CL changes RulesRegistryService so that the default WebRequestRulesRegistry
    is registered only if the declarative web request API is avaialble to the
    current environment. This, for example, means that no default web request rule
    registries would be created on the stable channel. Rules registries
    corresponding to webviews and the default content rules registry would still be
    created.
    
    This also helps fix issue 777717 and renderer cache is not cleared redundantly
    on each extension load/unload/uninstall when the API is not available.
    
    BUG=693243, 777717
    
    Change-Id: I7384fed71a86aea3f5cc8d2eafd1445b439dd76a
    Reviewed-on: https://chromium-review.googlesource.com/1072497Reviewed-by: default avatarIstiaque Ahmed <lazyboy@chromium.org>
    Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
    Commit-Queue: Karan Bhatia <karandeepb@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#563051}
    4f46cc0e
rules_registry_service.cc 9.97 KB