refactor: do not use AdaptCallbackForRepeating in electron_api_url_loader.cc

This commit is contained in:
Charles Kerr
2025-02-22 16:47:10 -06:00
parent c0f65489c4
commit 26c3a99be6
2 changed files with 3 additions and 3 deletions

View File

@@ -438,7 +438,7 @@ void SimpleURLLoaderWrapper::OnAuthRequired(
net::AuthCredentials(username_str, password_str));
},
std::move(auth_responder));
Emit("login", auth_info, base::AdaptCallbackForRepeating(std::move(cb)));
Emit("login", auth_info, std::move(cb));
}
void SimpleURLLoaderWrapper::OnSSLCertificateError(
@@ -716,8 +716,7 @@ void SimpleURLLoaderWrapper::OnDataReceived(std::string_view string_view,
v8::HandleScope handle_scope(isolate);
auto array_buffer = v8::ArrayBuffer::New(isolate, string_view.size());
memcpy(array_buffer->Data(), string_view.data(), string_view.size());
Emit("data", array_buffer,
base::AdaptCallbackForRepeating(std::move(resume)));
Emit("data", array_buffer, std::move(resume));
}
void SimpleURLLoaderWrapper::OnComplete(bool success) {

View File

@@ -11,6 +11,7 @@
#include "base/containers/span.h"
#include "gin/converter.h"
#include "gin/wrappable.h"
#include "shell/common/gin_adapters.h"
namespace gin_helper {