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

Issue 2691423006: Introduce the ThrottleManager (Closed)

Created:
3 years, 10 months ago by Charlie Harrison
Modified:
3 years, 9 months ago
Reviewers:
clamy, shivanisha, engedy
CC:
chromium-reviews, darin-cc_chromium.org, jam, subresource-filter-reviews_chromium.org, Bryan McQuade
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Introduce the ThrottleManager This patch adds a new class responsible for orchestrating the various navigation throttles associated with the subresource_filter. So far it is only exercised in unit tests. TBR=shivanisha@chromium.org BUG=637415 Review-Url: https://codereview.chromium.org/2691423006 Cr-Commit-Position: refs/heads/master@{#458188} Committed: https://chromium.googlesource.com/chromium/src/+/47c0e8d177ffdb35e1e58650993200a1832e46f1

Patch Set 1 #

Total comments: 10

Patch Set 2 : simplify Delegate two only two methods, VetoActivation and OnFirstSubresourceDisallowed #

Patch Set 3 : engedy initial comments #

Total comments: 18

Patch Set 4 : respond to more comments #

Total comments: 34

Patch Set 5 : address feedback #

Patch Set 6 : unit test #

Patch Set 7 : rebase + add same-site test #

Patch Set 8 : Make sure tests work in --site-per-process #

Patch Set 9 : rebase #

Patch Set 10 : rebase #

Total comments: 48

Patch Set 11 : engedy review (decent refactor) #

Patch Set 12 : rebase #

Patch Set 13 : rebase #

Patch Set 14 : fix activation state unit tests #

Total comments: 2

Patch Set 15 : update NavigationSimulator description #

Total comments: 12

Patch Set 16 : engedy review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1079 lines, -51 lines) Patch
M components/subresource_filter/content/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -0 lines 0 comments Download
M components/subresource_filter/content/browser/activation_state_computing_navigation_throttle.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +15 lines, -8 lines 0 comments Download
M components/subresource_filter/content/browser/activation_state_computing_navigation_throttle.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +12 lines, -17 lines 0 comments Download
M components/subresource_filter/content/browser/activation_state_computing_navigation_throttle_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +8 lines, -5 lines 0 comments Download
M components/subresource_filter/content/browser/async_document_subresource_filter.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +20 lines, -5 lines 0 comments Download
M components/subresource_filter/content/browser/async_document_subresource_filter.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +12 lines, -5 lines 0 comments Download
M components/subresource_filter/content/browser/async_document_subresource_filter_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +6 lines, -9 lines 0 comments Download
A components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +155 lines, -0 lines 0 comments Download
A components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +196 lines, -0 lines 0 comments Download
A components/subresource_filter/content/browser/content_subresource_filter_throttle_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +641 lines, -0 lines 0 comments Download
M components/subresource_filter/content/browser/subframe_navigation_filtering_throttle_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M content/public/test/navigation_simulator.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +4 lines, -0 lines 0 comments Download
M content/public/test/navigation_simulator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +6 lines, -1 line 0 comments Download

Messages

Total messages: 67 (45 generated)
Charlie Harrison
Hey Balazs, This is a rough draft CL (please ignore the unit tests, that work ...
3 years, 10 months ago (2017-02-17 05:48:00 UTC) #4
engedy
Agreed with both proposed changes, flushing pending comments, and I will continue looking at the ...
3 years, 10 months ago (2017-02-17 15:34:27 UTC) #7
Charlie Harrison
Addressed initial comments, thanks! https://codereview.chromium.org/2691423006/diff/1/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc File components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc (right): https://codereview.chromium.org/2691423006/diff/1/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc#newcode35 components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc:35: ContentSubresourceFilterThrottleManager:: On 2017/02/17 15:34:27, engedy ...
3 years, 10 months ago (2017-02-17 18:04:37 UTC) #8
engedy
A few comments, I will take another pass on Monday. https://codereview.chromium.org/2691423006/diff/40001/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc File components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc (right): https://codereview.chromium.org/2691423006/diff/40001/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc#newcode38 ...
3 years, 10 months ago (2017-02-17 20:44:44 UTC) #9
Charlie Harrison
Many thanks, hopefully I'll be able to straighten out the unit test situation soon, and ...
3 years, 10 months ago (2017-02-17 22:12:31 UTC) #10
engedy
Looks good % comments below. Looking forward to unit tests. https://codereview.chromium.org/2691423006/diff/40001/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc File components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc (right): https://codereview.chromium.org/2691423006/diff/40001/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc#newcode48 ...
3 years, 10 months ago (2017-02-20 15:58:14 UTC) #11
Charlie Harrison
Hey engedy: Here is the test suite for the throttle manager, plus responding to your ...
3 years, 9 months ago (2017-03-01 00:02:59 UTC) #20
Charlie Harrison
+shivanisha, this is a part of the major refactor of the filtering logic to work ...
3 years, 9 months ago (2017-03-07 14:28:10 UTC) #26
Charlie Harrison
cc bmcquade
3 years, 9 months ago (2017-03-08 19:58:44 UTC) #28
engedy
https://codereview.chromium.org/2691423006/diff/40001/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc File components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc (right): https://codereview.chromium.org/2691423006/diff/40001/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc#newcode112 components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc:112: if (navigation_handle->IsInMainFrame() || navigation_handle->IsSamePage()) To quote a popular meme: ...
3 years, 9 months ago (2017-03-10 17:36:21 UTC) #33
engedy
https://codereview.chromium.org/2691423006/diff/180001/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc File components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc (right): https://codereview.chromium.org/2691423006/diff/180001/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc#newcode77 components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc:77: // and won't receive valid filters or activation states. ...
3 years, 9 months ago (2017-03-10 17:55:55 UTC) #34
engedy
Superb work, thanks! LGTM % outstanding comments. https://codereview.chromium.org/2691423006/diff/180001/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc File components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc (right): https://codereview.chromium.org/2691423006/diff/180001/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc#newcode65 components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc:65: // Make ...
3 years, 9 months ago (2017-03-10 20:50:35 UTC) #35
Charlie Harrison
Hey Balazs, The ReadyToCommit/DidFinishNavigation issue caused some issues. I have a solution which works pretty ...
3 years, 9 months ago (2017-03-14 23:18:32 UTC) #46
Charlie Harrison
+clamy for NavigationSimulator changes. The convenience function to get the final RFH is not strictly ...
3 years, 9 months ago (2017-03-15 00:13:12 UTC) #52
clamy
Thanks! Lgtm % one comment. https://codereview.chromium.org/2691423006/diff/260001/content/public/test/navigation_simulator.h File content/public/test/navigation_simulator.h (right): https://codereview.chromium.org/2691423006/diff/260001/content/public/test/navigation_simulator.h#newcode123 content/public/test/navigation_simulator.h:123: // Must be called ...
3 years, 9 months ago (2017-03-20 15:50:10 UTC) #55
Charlie Harrison
Thanks! Balazs: Waiting for one more sign off from you (mostly for changes to the ...
3 years, 9 months ago (2017-03-20 16:34:04 UTC) #56
Charlie Harrison
Shivani: forgot to say, in the case that I land this before your review, please ...
3 years, 9 months ago (2017-03-20 16:35:19 UTC) #57
engedy
LGTM % comments, thanks a lot! https://codereview.chromium.org/2691423006/diff/180001/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc File components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc (right): https://codereview.chromium.org/2691423006/diff/180001/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc#newcode65 components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc:65: // Make sure ...
3 years, 9 months ago (2017-03-20 18:58:14 UTC) #58
Charlie Harrison
Thanks Balazs. Sending to CQ now, I'll try to wire up with the safebrowsing client ...
3 years, 9 months ago (2017-03-20 20:02:56 UTC) #59
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/2691423006/300001
3 years, 9 months ago (2017-03-20 20:09:22 UTC) #63
commit-bot: I haz the power
Committed patchset #16 (id:300001) as https://chromium.googlesource.com/chromium/src/+/47c0e8d177ffdb35e1e58650993200a1832e46f1
3 years, 9 months ago (2017-03-20 21:20:12 UTC) #66
shivanisha
3 years, 9 months ago (2017-03-23 19:24:15 UTC) #67
Message was sent while issue was closed.
On 2017/03/20 at 21:20:12, commit-bot wrote:
> Committed patchset #16 (id:300001) as
https://chromium.googlesource.com/chromium/src/+/47c0e8d177ffdb35e1e586509932...

csharrison@, Sure, I will TBR. It might be a few days before I do as I am caught
up in the cache lock work right now.

Powered by Google App Engine
This is Rietveld 408576698