Use RFH::AddMessageToConsole in ContentSubresourceFilterThrottleManager
Currently, in ContentSubresourceFilterThrottleManager:: DidFinishNavigation, there is a call to NavigationConsoleLogger:: LogMessageOnCommit. This always results in a message being immediately added to console, as it is only called for committed navigations. For simplicity, and as the other functionality of NavigationConsoleLogger is unnecessary for this purpose, we change this call to a direct call to RenderFrameHost::AddMessageToConsole. This will also aid in minor refactoring planned for crbug.com/1055558, which will factor out this code path into a function and pass it as a callback for a posted task in certain cases. This change avoids the need to pass a pointer to a navigation_handle, which may be in the process of being deleted, to any posted task. Bug: 1067010 Change-Id: I7a3f3a8fed2bfbac23955afe5f45f5a43c22c46f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2132779 Commit-Queue: Alex Turner <alexmt@chromium.org> Reviewed-by:Charlie Harrison <csharrison@chromium.org> Cr-Commit-Position: refs/heads/master@{#756480}
Showing
Please register or sign in to comment