refactor: do not use AdaptCallbackForRepeating()
in electron_api_url_loader.cc
(#45784)
refactor: do not use AdaptCallbackForRepeating in electron_api_url_loader.cc Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
parent
24bc99cc2f
commit
aa584714cd
2 changed files with 3 additions and 3 deletions
|
@ -438,7 +438,7 @@ void SimpleURLLoaderWrapper::OnAuthRequired(
|
||||||
net::AuthCredentials(username_str, password_str));
|
net::AuthCredentials(username_str, password_str));
|
||||||
},
|
},
|
||||||
std::move(auth_responder));
|
std::move(auth_responder));
|
||||||
Emit("login", auth_info, base::AdaptCallbackForRepeating(std::move(cb)));
|
Emit("login", auth_info, std::move(cb));
|
||||||
}
|
}
|
||||||
|
|
||||||
void SimpleURLLoaderWrapper::OnSSLCertificateError(
|
void SimpleURLLoaderWrapper::OnSSLCertificateError(
|
||||||
|
@ -716,8 +716,7 @@ void SimpleURLLoaderWrapper::OnDataReceived(std::string_view string_view,
|
||||||
v8::HandleScope handle_scope(isolate);
|
v8::HandleScope handle_scope(isolate);
|
||||||
auto array_buffer = v8::ArrayBuffer::New(isolate, string_view.size());
|
auto array_buffer = v8::ArrayBuffer::New(isolate, string_view.size());
|
||||||
memcpy(array_buffer->Data(), string_view.data(), string_view.size());
|
memcpy(array_buffer->Data(), string_view.data(), string_view.size());
|
||||||
Emit("data", array_buffer,
|
Emit("data", array_buffer, std::move(resume));
|
||||||
base::AdaptCallbackForRepeating(std::move(resume)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SimpleURLLoaderWrapper::OnComplete(bool success) {
|
void SimpleURLLoaderWrapper::OnComplete(bool success) {
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include "base/containers/span.h"
|
#include "base/containers/span.h"
|
||||||
#include "gin/converter.h"
|
#include "gin/converter.h"
|
||||||
#include "gin/wrappable.h"
|
#include "gin/wrappable.h"
|
||||||
|
#include "shell/common/gin_converters/std_converter.h" // for ConvertToV8(iso, &&)
|
||||||
|
|
||||||
namespace gin_helper {
|
namespace gin_helper {
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue