Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(486)

Issue 2705513002: Extensions: Only create Web request rules registry if Declarative Web Request is enabled. (Closed)

Created:
3 years, 10 months ago by karandeepb
Modified:
3 years, 9 months ago
Reviewers:
Devlin
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Extensions: 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. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+101 lines, -78 lines) Patch
M extensions/browser/api/declarative/rules_registry_service.cc View 1 2 2 chunks +26 lines, -17 lines 0 comments Download
M extensions/common/features/complex_feature.h View 1 chunk +2 lines, -0 lines 0 comments Download
M extensions/common/features/complex_feature.cc View 1 chunk +18 lines, -0 lines 0 comments Download
M extensions/common/features/feature.h View 2 chunks +7 lines, -0 lines 0 comments Download
M extensions/common/features/simple_feature.h View 1 chunk +2 lines, -0 lines 0 comments Download
M extensions/common/features/simple_feature.cc View 1 2 chunks +12 lines, -0 lines 0 comments Download
M extensions/common/features/simple_feature_unittest.cc View 1 2 3 6 chunks +34 lines, -61 lines 0 comments Download

Messages

Total messages: 34 (18 generated)
karandeepb
PTAL Devlin. Can add tests for IsAvailableToChannel if you think the approach is sound. https://codereview.chromium.org/2705513002/diff/20001/extensions/browser/api/declarative/rules_registry_service.cc ...
3 years, 10 months ago (2017-02-17 02:07:57 UTC) #7
Devlin
This seems reasonable to me. A couple quick sanity tests on the new feature method ...
3 years, 10 months ago (2017-02-17 19:58:28 UTC) #8
karandeepb
PTAL Devlin. https://codereview.chromium.org/2705513002/diff/20001/extensions/browser/api/declarative/rules_registry_service.cc File extensions/browser/api/declarative/rules_registry_service.cc (right): https://codereview.chromium.org/2705513002/diff/20001/extensions/browser/api/declarative/rules_registry_service.cc#newcode86 extensions/browser/api/declarative/rules_registry_service.cc:86: RulesCacheDelegate* web_request_cache_delegate = NULL; On 2017/02/17 19:58:28, ...
3 years, 10 months ago (2017-02-18 02:00:30 UTC) #11
Devlin
lgtm https://codereview.chromium.org/2705513002/diff/40001/extensions/common/features/simple_feature_unittest.cc File extensions/common/features/simple_feature_unittest.cc (right): https://codereview.chromium.org/2705513002/diff/40001/extensions/common/features/simple_feature_unittest.cc#newcode768 extensions/common/features/simple_feature_unittest.cc:768: // Rule: "legacy_packaged_app", channel stable. nit: update this ...
3 years, 10 months ago (2017-02-18 07:50:07 UTC) #14
karandeepb
https://codereview.chromium.org/2705513002/diff/40001/extensions/common/features/simple_feature_unittest.cc File extensions/common/features/simple_feature_unittest.cc (right): https://codereview.chromium.org/2705513002/diff/40001/extensions/common/features/simple_feature_unittest.cc#newcode768 extensions/common/features/simple_feature_unittest.cc:768: // Rule: "legacy_packaged_app", channel stable. On 2017/02/18 07:50:07, Devlin ...
3 years, 10 months ago (2017-02-21 18:47:08 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2705513002/60001
3 years, 10 months ago (2017-02-21 18:48:24 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL)
3 years, 10 months ago (2017-02-21 20:52:09 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2705513002/60001
3 years, 10 months ago (2017-02-21 21:34:20 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL)
3 years, 10 months ago (2017-02-21 23:39:02 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2705513002/60001
3 years, 10 months ago (2017-02-22 18:48:03 UTC) #26
commit-bot: I haz the power
Committed patchset #4 (id:60001) as https://chromium.googlesource.com/chromium/src/+/a77b53baca5f2a4ff102592c17c8ea3f53dd5307
3 years, 10 months ago (2017-02-22 22:38:13 UTC) #29
Devlin
On 2017/02/22 22:38:13, commit-bot: I haz the power wrote: > Committed patchset #4 (id:60001) as ...
3 years, 9 months ago (2017-03-16 20:21:22 UTC) #30
karandeepb
On 2017/03/16 20:21:22, Devlin wrote: > On 2017/02/22 22:38:13, commit-bot: I haz the power wrote: ...
3 years, 9 months ago (2017-03-16 20:49:30 UTC) #31
Devlin
On 2017/03/16 20:49:30, karandeepb wrote: > On 2017/03/16 20:21:22, Devlin wrote: > > On 2017/02/22 ...
3 years, 9 months ago (2017-03-16 20:51:05 UTC) #32
karandeepb
On 2017/03/16 20:51:05, Devlin wrote: > On 2017/03/16 20:49:30, karandeepb wrote: > > On 2017/03/16 ...
3 years, 9 months ago (2017-03-16 21:02:40 UTC) #33
karandeepb
3 years, 9 months ago (2017-03-23 18:20:30 UTC) #34
Message was sent while issue was closed.
A revert of this CL (patchset #4 id:60001) has been created in
https://codereview.chromium.org/2773593003/ by karandeepb@chromium.org.

The reason for reverting is: Declarative Web Request is enabled on Stable
through <webview>. Hence we can't disable creation of rules registry on Stable..

Powered by Google App Engine
This is Rietveld 408576698