Commit 72399e30 authored by Maksim Moskvitin's avatar Maksim Moskvitin Committed by Chromium LUCI CQ

[CodeHealth] Convert c/b/e/api/webrtc_logging_private to use modern callback

Bug: 1152279
Change-Id: Ib6e9b3f4987fe7c39d372059db2b775540c197d0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2643318
Commit-Queue: Maksim Moskvitin <mmoskvitin@google.com>
Reviewed-by: default avatarDavid Bertoni <dbertoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#846045}
parent 682257e6
......@@ -198,7 +198,7 @@ WebrtcLoggingPrivateFunctionWithGenericCallback::PrepareTask(
const std::string& security_origin,
WebRtcLoggingController::GenericDoneCallback* callback,
std::string* error) {
*callback = base::Bind(
*callback = base::BindOnce(
&WebrtcLoggingPrivateFunctionWithGenericCallback::FireCallback, this);
return LoggingControllerFromRequest(request, security_origin, error);
}
......@@ -345,8 +345,8 @@ WebrtcLoggingPrivateUploadStoredFunction::Run() {
if (!logging_controller)
return RespondNow(Error(std::move(error)));
WebRtcLoggingController::UploadDoneCallback callback =
base::Bind(&WebrtcLoggingPrivateUploadStoredFunction::FireCallback, this);
WebRtcLoggingController::UploadDoneCallback callback = base::BindOnce(
&WebrtcLoggingPrivateUploadStoredFunction::FireCallback, this);
const std::string local_log_id(HashIdWithOrigin(params->security_origin,
params->log_id));
......@@ -366,7 +366,7 @@ ExtensionFunction::ResponseAction WebrtcLoggingPrivateUploadFunction::Run() {
return RespondNow(Error(std::move(error)));
WebRtcLoggingController::UploadDoneCallback callback =
base::Bind(&WebrtcLoggingPrivateUploadFunction::FireCallback, this);
base::BindOnce(&WebrtcLoggingPrivateUploadFunction::FireCallback, this);
logging_controller->UploadLog(std::move(callback));
return RespondLater();
......@@ -413,8 +413,8 @@ WebrtcLoggingPrivateStartRtpDumpFunction::Run() {
WebRtcLoggingController* webrtc_logging_controller =
WebRtcLoggingController::FromRenderProcessHost(host);
WebRtcLoggingController::GenericDoneCallback callback =
base::Bind(&WebrtcLoggingPrivateStartRtpDumpFunction::FireCallback, this);
WebRtcLoggingController::GenericDoneCallback callback = base::BindOnce(
&WebrtcLoggingPrivateStartRtpDumpFunction::FireCallback, this);
webrtc_logging_controller->StartRtpDump(type, std::move(callback));
return RespondLater();
......@@ -446,8 +446,8 @@ WebrtcLoggingPrivateStopRtpDumpFunction::Run() {
WebRtcLoggingController* webrtc_logging_controller =
WebRtcLoggingController::FromRenderProcessHost(host);
WebRtcLoggingController::GenericDoneCallback callback =
base::Bind(&WebrtcLoggingPrivateStopRtpDumpFunction::FireCallback, this);
WebRtcLoggingController::GenericDoneCallback callback = base::BindOnce(
&WebrtcLoggingPrivateStopRtpDumpFunction::FireCallback, this);
webrtc_logging_controller->StopRtpDump(type, std::move(callback));
return RespondLater();
......@@ -481,12 +481,12 @@ WebrtcLoggingPrivateStartAudioDebugRecordingsFunction::Run() {
audio_debug_recordings_handler->StartAudioDebugRecordings(
host, base::TimeDelta::FromSeconds(params->seconds),
base::Bind(
base::BindOnce(
&WebrtcLoggingPrivateStartAudioDebugRecordingsFunction::FireCallback,
this),
base::Bind(&WebrtcLoggingPrivateStartAudioDebugRecordingsFunction::
FireErrorCallback,
this));
base::BindOnce(&WebrtcLoggingPrivateStartAudioDebugRecordingsFunction::
FireErrorCallback,
this));
return RespondLater();
}
......@@ -513,12 +513,12 @@ WebrtcLoggingPrivateStopAudioDebugRecordingsFunction::Run() {
audio_debug_recordings_handler->StopAudioDebugRecordings(
host,
base::Bind(
base::BindOnce(
&WebrtcLoggingPrivateStopAudioDebugRecordingsFunction::FireCallback,
this),
base::Bind(&WebrtcLoggingPrivateStopAudioDebugRecordingsFunction::
FireErrorCallback,
this));
base::BindOnce(&WebrtcLoggingPrivateStopAudioDebugRecordingsFunction::
FireErrorCallback,
this));
return RespondLater();
}
......@@ -588,9 +588,9 @@ WebrtcLoggingPrivateGetLogsDirectoryFunction::Run() {
}
webrtc_logging_controller->GetLogsDirectory(
base::Bind(&WebrtcLoggingPrivateGetLogsDirectoryFunction::FireCallback,
this),
base::Bind(
base::BindOnce(
&WebrtcLoggingPrivateGetLogsDirectoryFunction::FireCallback, this),
base::BindOnce(
&WebrtcLoggingPrivateGetLogsDirectoryFunction::FireErrorCallback,
this));
return RespondLater();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment