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

Issue 2831373002: Introduce subresource_filter::ConfigurationList and make querying it cheap. (Closed)

Created:
3 years, 8 months ago by engedy
Modified:
3 years, 8 months ago
CC:
chromium-reviews, subresource-filter-reviews_chromium.org, vakh+watch_chromium.org, grt+watch_chromium.org, jam, timvolodine, darin-cc_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Introduce subresource_filter::ConfigurationList and make querying it cheap. For now, the list will still have exactly one Configuration, the one that is parsed from the field trial configuration. Therefore the benefits of this change for now is that tests, which change the configuration after their WebContents is created, will no longer need to inject the new configuration manually into the classes under test, because those classes can now directly work with the authoritative global state. BUG=708181 Review-Url: https://codereview.chromium.org/2831373002 Cr-Commit-Position: refs/heads/master@{#466857} Committed: https://chromium.googlesource.com/chromium/src/+/f1269b6b08358849f9fed290de619122e34135b1

Patch Set 1 #

Patch Set 2 : Polish. #

Patch Set 3 : More polish. #

Total comments: 7

Patch Set 4 : Comment nit. #

Patch Set 5 : Rebase. #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+154 lines, -96 lines) Patch
M chrome/browser/component_updater/subresource_filter_component_installer.cc View 1 1 chunk +3 lines, -2 lines 2 comments Download
M chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc View 1 2 3 chunks +0 lines, -9 lines 0 comments Download
M chrome/browser/subresource_filter/subresource_filter_browsertest.cc View 1 2 1 chunk +0 lines, -3 lines 0 comments Download
M components/subresource_filter/content/browser/content_subresource_filter_driver_factory.h View 1 2 3 chunks +0 lines, -11 lines 0 comments Download
M components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc View 1 6 chunks +21 lines, -14 lines 2 comments Download
M components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc View 1 18 chunks +9 lines, -20 lines 0 comments Download
M components/subresource_filter/core/browser/subresource_filter_features.h View 1 2 3 2 chunks +33 lines, -2 lines 2 comments Download
M components/subresource_filter/core/browser/subresource_filter_features.cc View 1 2 3 chunks +59 lines, -28 lines 0 comments Download
M components/subresource_filter/core/browser/subresource_filter_features_test_support.cc View 1 chunk +8 lines, -0 lines 0 comments Download
M components/subresource_filter/core/browser/subresource_filter_features_unittest.cc View 1 7 chunks +21 lines, -7 lines 2 comments Download

Messages

Total messages: 32 (19 generated)
engedy
Charlie, please take a look.
3 years, 8 months ago (2017-04-21 16:43:16 UTC) #10
Charlie Harrison
LGTM % comments. https://codereview.chromium.org/2831373002/diff/40001/components/subresource_filter/core/browser/subresource_filter_features.h File components/subresource_filter/core/browser/subresource_filter_features.h (right): https://codereview.chromium.org/2831373002/diff/40001/components/subresource_filter/core/browser/subresource_filter_features.h#newcode75 components/subresource_filter/core/browser/subresource_filter_features.h:75: // Retrieves all currently enabled subresource ...
3 years, 8 months ago (2017-04-21 17:37:27 UTC) #11
engedy
Please take another look. https://codereview.chromium.org/2831373002/diff/40001/components/subresource_filter/core/browser/subresource_filter_features.h File components/subresource_filter/core/browser/subresource_filter_features.h (right): https://codereview.chromium.org/2831373002/diff/40001/components/subresource_filter/core/browser/subresource_filter_features.h#newcode75 components/subresource_filter/core/browser/subresource_filter_features.h:75: // Retrieves all currently enabled ...
3 years, 8 months ago (2017-04-24 14:35:35 UTC) #16
engedy
Dear Owners, please review mechanical changes: @Sorin: c/b/component_updater, @Nathan: c/b/safe_browsing. Thank you!
3 years, 8 months ago (2017-04-24 14:38:04 UTC) #18
Charlie Harrison
still LGTM https://codereview.chromium.org/2831373002/diff/40001/components/subresource_filter/core/browser/subresource_filter_features.h File components/subresource_filter/core/browser/subresource_filter_features.h (right): https://codereview.chromium.org/2831373002/diff/40001/components/subresource_filter/core/browser/subresource_filter_features.h#newcode78 components/subresource_filter/core/browser/subresource_filter_features.h:78: scoped_refptr<ConfigurationList> GetActiveConfigurations(); On 2017/04/24 14:35:35, engedy wrote: ...
3 years, 8 months ago (2017-04-24 14:40:59 UTC) #19
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/2831373002/80001
3 years, 8 months ago (2017-04-24 14:43:54 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/418568)
3 years, 8 months ago (2017-04-24 14:51:00 UTC) #23
Sorin Jianu
lgtm Thank you! component updater lgtm https://codereview.chromium.org/2831373002/diff/80001/chrome/browser/component_updater/subresource_filter_component_installer.cc File chrome/browser/component_updater/subresource_filter_component_installer.cc (right): https://codereview.chromium.org/2831373002/diff/80001/chrome/browser/component_updater/subresource_filter_component_installer.cc#newcode115 chrome/browser/component_updater/subresource_filter_component_installer.cc:115: std::string ruleset_flavor = ...
3 years, 8 months ago (2017-04-24 21:58:59 UTC) #24
Nathan Parker
safe_browsing/* LGTM
3 years, 8 months ago (2017-04-24 22:36:58 UTC) #25
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/2831373002/80001
3 years, 8 months ago (2017-04-25 01:07:08 UTC) #27
commit-bot: I haz the power
Committed patchset #5 (id:80001) as https://chromium.googlesource.com/chromium/src/+/f1269b6b08358849f9fed290de619122e34135b1
3 years, 8 months ago (2017-04-25 01:29:58 UTC) #30
engedy
Thanks, Sorin, and apologies for the many nits. Unfortunately we were a bit trigger-happy with ...
3 years, 8 months ago (2017-04-25 08:34:24 UTC) #31
Charlie Harrison
3 years, 8 months ago (2017-04-25 11:56:56 UTC) #32
Message was sent while issue was closed.
On 2017/04/25 08:34:24, engedy wrote:
> Thanks, Sorin, and apologies for the many nits.
> 
> Unfortunately we were a bit trigger-happy with sending this to the CQ, but I
> have addressed your comments in a follow-up CL:
> https://codereview.chromium.org/2837163004/.
> 
>
https://codereview.chromium.org/2831373002/diff/80001/chrome/browser/componen...
> File
chrome/browser/component_updater/subresource_filter_component_installer.cc
> (right):
> 
>
https://codereview.chromium.org/2831373002/diff/80001/chrome/browser/componen...
>
chrome/browser/component_updater/subresource_filter_component_installer.cc:115:
> std::string ruleset_flavor = subresource_filter::GetActiveConfigurations()
> On 2017/04/24 21:58:59, Sorin Jianu wrote:
> > can this be declared const?
> 
> Yep, done.
> 
>
https://codereview.chromium.org/2831373002/diff/80001/components/subresource_...
> File
>
components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc
> (right):
> 
>
https://codereview.chromium.org/2831373002/diff/80001/components/subresource_...
>
components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc:118:
> auto configurations = GetActiveConfigurations();
> On 2017/04/24 21:58:59, Sorin Jianu wrote:
> > const?
> > 
> > Also, please review the similar call sites below.
> 
> Done.
> 
>
https://codereview.chromium.org/2831373002/diff/80001/components/subresource_...
> File components/subresource_filter/core/browser/subresource_filter_features.h
> (right):
> 
>
https://codereview.chromium.org/2831373002/diff/80001/components/subresource_...
> components/subresource_filter/core/browser/subresource_filter_features.h:62:
> ConfigurationList(Configuration config);
> On 2017/04/24 21:58:59, Sorin Jianu wrote:
> > explicit?
> 
> Done.
> 
>
https://codereview.chromium.org/2831373002/diff/80001/components/subresource_...
> File
>
components/subresource_filter/core/browser/subresource_filter_features_unittest.cc
> (right):
> 
>
https://codereview.chromium.org/2831373002/diff/80001/components/subresource_...
>
components/subresource_filter/core/browser/subresource_filter_features_unittest.cc:45:
> auto active_configurations = GetActiveConfigurations();
> On 2017/04/24 21:58:59, Sorin Jianu wrote:
> > can this be const, here and below?
> 
> Yep, done.

Sorry! That was my fault. For some reason I thought those had been addressed.

Powered by Google App Engine
This is Rietveld 408576698