DescriptionRefactor BaseBlockingPage to reduce duplicated code
Duplicated code handling ReportDetails is moved out of
CreateControllerClient() into a static method in the base class
(GetReportingInfo). CreateControllerClient now uses the |ui_manager|
directly, reducing the number of arguments it requires and reducing
clutter when constructing the blocking pages.
Chrome-only subresource checks at the end of OnProceed() have been moved
into a new method (HandleSubresourcesAfterProceed). This is empty in the
base class, since the base class ignores this case.
The base class OnProceed() method now calls FinishThreatDetails() like
chrome requires. This is to be consistent with the other
FinishThreatDetails() calls we kept in the base class. If the base class
ever really implements this, then we would also want to call it for
OnProceed. This method is currently a NOOP, so this presents no change
in behavior. Along with this change, |threat_details_proceed_delay_ms_|
has been componentized as well, moved to private, and a test-only setter
has been added. Because of these changes, Chrome now uses the component
layer OnProceed method.
ShowBlockingPage() is restructured to be more readable. No change beyond
that, since I couldn't think of a clean way to reduce code duplication.
Lastly, unnecessary includes have been removed.
BUG=
Review-Url: https://codereview.chromium.org/2700323002
Cr-Commit-Position: refs/heads/master@{#452717}
Committed: https://chromium.googlesource.com/chromium/src/+/fef42f9a072d257f7f4ef0300ea172f45754167a
Patch Set 1 #
Messages
Total messages: 19 (10 generated)
|