Convert chrome/browser/*process_singleton* Callbacks/Binds
Converts Callbacks used by the *process_singleton* classes to Repeating
Callbacks. Most callbacks are obviously (at least potentially) called
multiple times; however, the ShouldKillRemoteProcessCallback appears to
only be called once, as a result of PreMainMessageLoopRun. Despite this,
this change opts to make it a RepeatingCallback as nothing in its usage
would prevent it from being called multiple times and it appears to only
be a callback (instead of a direct method call), so that the behavior
can be overridden by tests.
Additionally, converts base::Binds used by the *process_singleton*
classes where the consuming API has been updated to take a particular
type.
After this change the *process_singleton* files should be clean of any
base::Bind(, base::Callback<, and base::Closure calls.
Bug: 1007635
Change-Id: Ifbf9fc165e063440f4f6ac3212f0cd403f70dfa3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2296637
Reviewed-by: Scott Violet <[email protected]>
Reviewed-by: Greg Thompson <[email protected]>
Commit-Queue: Alexander Cooper <[email protected]>
Auto-Submit: Alexander Cooper <[email protected]>
Cr-Commit-Position: refs/heads/master@{#789258}
diff --git a/chrome/browser/chrome_process_singleton.h b/chrome/browser/chrome_process_singleton.h
index 71df237..4bf0d4fd 100644
--- a/chrome/browser/chrome_process_singleton.h
+++ b/chrome/browser/chrome_process_singleton.h
@@ -44,7 +44,8 @@
// Receives a callback to be run to close the active modal dialog, or an empty
// closure if the active dialog is dismissed.
- void SetModalDialogNotificationHandler(base::Closure notification_handler);
+ void SetModalDialogNotificationHandler(
+ base::RepeatingClosure notification_handler);
// Executes previously queued command-line invocations and allows future
// invocations to be executed immediately.