DescriptionExtensions: Only create Web request rules registry if Declarative Web Request is enabled.
Currently the Web Request rules registry required by the Declarative Web
Request API is created on all Chrome channels, even though the Declarative Web
Request API is disabled on Stable. The UMA metric
Extensions.NetworkDelayRegistryLoad shows significant delay for some web
requests which are blocked due to the loading of the Web Request rules
registry even on Stable. The mean delay is around 1.7 sec and the median delay
is around 50ms.
This CL modifies RulesRegistryService::EnsureDefaultRulesRegistriesRegistered
to ensure the Web Request rules registry is only created for the channels on
which the Declarative Web Request API is enabled. To do this,
Feature::IsAvailableToChannel is introduced.
BUG=693243
Review-Url: https://codereview.chromium.org/2705513002
Cr-Commit-Position: refs/heads/master@{#452240}
Committed: https://chromium.googlesource.com/chromium/src/+/a77b53baca5f2a4ff102592c17c8ea3f53dd5307
Patch Set 1 #Patch Set 2 : Typo #
Total comments: 4
Patch Set 3 : Add tests. #
Total comments: 3
Patch Set 4 : Correct comment. #
Messages
Total messages: 34 (18 generated)
|