chore: remove last instances of base::Bind (#18178)

* chore: remove last instances of base::Bind

* MessageBoxCallback is a OnceCallback

* convert permission helepr cbs to Once

* convert ResponseCallback to Once
This commit is contained in:
Shelley Vohr 2019-05-29 13:02:15 -07:00 committed by GitHub
parent 96371b6d75
commit 9af5072115
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 122 additions and 109 deletions

View file

@ -176,7 +176,8 @@ ProcessSingleton::ProcessSingleton(
is_virtualized_(false),
lock_file_(INVALID_HANDLE_VALUE),
user_data_dir_(user_data_dir),
should_kill_remote_process_callback_(base::Bind(&TerminateAppWithError)) {
should_kill_remote_process_callback_(
base::BindRepeating(&TerminateAppWithError)) {
// The user_data_dir may have not been created yet.
base::CreateDirectoryAndGetError(user_data_dir, nullptr);
}
@ -290,9 +291,10 @@ bool ProcessSingleton::Create() {
if (lock_file_ != INVALID_HANDLE_VALUE) {
// Set the window's title to the path of our user data directory so
// other Chrome instances can decide if they should forward to us.
bool result = window_.CreateNamed(
base::Bind(&ProcessLaunchNotification, notification_callback_),
user_data_dir_.value());
bool result =
window_.CreateNamed(base::BindRepeating(&ProcessLaunchNotification,
notification_callback_),
user_data_dir_.value());
// NB: Ensure that if the primary app gets started as elevated
// admin inadvertently, secondary windows running not as elevated