[Subresource Filter] Introduce ProfileInteractionManager
Most of what ChromeSubresourceFilterClient is currently doing is managing interaction between the per-navigation/per-tab objects (i.e., the throttles and throttle manager) and the now-componentized per-profile objects (e.g., content settings). All of this management is relevant for WebLayer as well. While I it would be possible to pull all of this code directly into the ThrottleManager, it lies outside the current core responsibilities of ThrottleManager and risks making that class too fat. This CL introduces a new ProfileInteractionManager class that lives next to the ThrottleManager. All of the places within the component that currently call into the client will call into the profile interaction manager class instead (with the exception of the very few methods that are actually on the client, e.g. actually showing the infobar). As a start, this CL moves the implementation of OnReloadRequested() into ProfileInteractionManager. With respect to unittesting of the new class, my suspicion is that most of the //chrome-level unittests are effectively going to end up being tests of ProfileInteractionManager and will be suitable for componentization as such once the dust has settled. During the process, test coverage will remain via those //chrome-level unittests as well as //chrome's browsertests. Bug: 1116095 Change-Id: Id64ca19cd1844cdc76b959679f5ad6ca0808f2a6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2575077 Commit-Queue: Colin Blundell <blundell@chromium.org> Reviewed-by:Charlie Harrison <csharrison@chromium.org> Cr-Commit-Position: refs/heads/master@{#835649}
Showing
Please register or sign in to comment