mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
chore: bump chromium to 87.0.4251.1 (11-x-y) (#25259)
This commit is contained in:
committed by
GitHub
parent
35d2727de0
commit
b88396cf00
@@ -252,7 +252,8 @@ gin::WrapperInfo SimpleURLLoaderWrapper::kWrapperInfo = {
|
||||
|
||||
SimpleURLLoaderWrapper::SimpleURLLoaderWrapper(
|
||||
std::unique_ptr<network::ResourceRequest> request,
|
||||
network::mojom::URLLoaderFactory* url_loader_factory)
|
||||
network::mojom::URLLoaderFactory* url_loader_factory,
|
||||
int options)
|
||||
: id_(GetAllRequests().Add(this)) {
|
||||
// We slightly abuse the |render_frame_id| field in ResourceRequest so that
|
||||
// we can correlate any authentication events that arrive with this request.
|
||||
@@ -269,6 +270,7 @@ SimpleURLLoaderWrapper::SimpleURLLoaderWrapper(
|
||||
}
|
||||
|
||||
loader_->SetAllowHttpErrorResults(true);
|
||||
loader_->SetURLLoaderFactoryOptions(options);
|
||||
loader_->SetOnResponseStartedCallback(base::BindOnce(
|
||||
&SimpleURLLoaderWrapper::OnResponseStarted, base::Unretained(this)));
|
||||
loader_->SetOnRedirectCallback(base::BindRepeating(
|
||||
@@ -367,8 +369,10 @@ gin::Handle<SimpleURLLoaderWrapper> SimpleURLLoaderWrapper::Create(
|
||||
|
||||
bool use_session_cookies = false;
|
||||
opts.Get("useSessionCookies", &use_session_cookies);
|
||||
int options = 0;
|
||||
if (!use_session_cookies) {
|
||||
request->load_flags |= net::LOAD_DO_NOT_SEND_COOKIES;
|
||||
request->credentials_mode = network::mojom::CredentialsMode::kInclude;
|
||||
options |= network::mojom::kURLLoadOptionBlockAllCookies;
|
||||
}
|
||||
|
||||
// Chromium filters headers using browser rules, while for net module we have
|
||||
@@ -411,7 +415,8 @@ gin::Handle<SimpleURLLoaderWrapper> SimpleURLLoaderWrapper::Create(
|
||||
|
||||
auto ret = gin::CreateHandle(
|
||||
args->isolate(),
|
||||
new SimpleURLLoaderWrapper(std::move(request), url_loader_factory.get()));
|
||||
new SimpleURLLoaderWrapper(std::move(request), url_loader_factory.get(),
|
||||
options));
|
||||
ret->Pin();
|
||||
if (!chunk_pipe_getter.IsEmpty()) {
|
||||
ret->PinBodyGetter(chunk_pipe_getter);
|
||||
|
||||
@@ -64,7 +64,8 @@ class SimpleURLLoaderWrapper
|
||||
|
||||
private:
|
||||
SimpleURLLoaderWrapper(std::unique_ptr<network::ResourceRequest> loader,
|
||||
network::mojom::URLLoaderFactory* url_loader_factory);
|
||||
network::mojom::URLLoaderFactory* url_loader_factory,
|
||||
int options);
|
||||
|
||||
// SimpleURLLoaderStreamConsumer:
|
||||
void OnDataReceived(base::StringPiece string_piece,
|
||||
|
||||
@@ -394,7 +394,7 @@ base::string16 GetDefaultPrinterAsync() {
|
||||
|
||||
scoped_refptr<printing::PrintBackend> backend =
|
||||
printing::PrintBackend::CreateInstance(
|
||||
nullptr, g_browser_process->GetApplicationLocale());
|
||||
g_browser_process->GetApplicationLocale());
|
||||
std::string printer_name = backend->GetDefaultPrinterName();
|
||||
return base::UTF8ToUTF16(printer_name);
|
||||
}
|
||||
@@ -1558,7 +1558,7 @@ void WebContents::SetBackgroundThrottling(bool allowed) {
|
||||
web_contents()->GetRenderViewHost()->SetSchedulerThrottling(allowed);
|
||||
|
||||
if (rwh_impl->is_hidden()) {
|
||||
rwh_impl->WasShown(base::nullopt);
|
||||
rwh_impl->WasShown({});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2068,8 +2068,9 @@ void WebContents::Print(gin::Arguments* args) {
|
||||
// Set whether to print color or greyscale
|
||||
bool print_color = true;
|
||||
options.Get("color", &print_color);
|
||||
int color_setting = print_color ? printing::COLOR : printing::GRAY;
|
||||
settings.SetIntKey(printing::kSettingColor, color_setting);
|
||||
auto const color_model = print_color ? printing::mojom::ColorModel::kColor
|
||||
: printing::mojom::ColorModel::kGray;
|
||||
settings.SetIntKey(printing::kSettingColor, static_cast<int>(color_model));
|
||||
|
||||
// Is the orientation landscape or portrait.
|
||||
bool landscape = false;
|
||||
@@ -2185,7 +2186,7 @@ void WebContents::Print(gin::Arguments* args) {
|
||||
std::vector<printing::PrinterBasicInfo> WebContents::GetPrinterList() {
|
||||
std::vector<printing::PrinterBasicInfo> printers;
|
||||
auto print_backend = printing::PrintBackend::CreateInstance(
|
||||
nullptr, g_browser_process->GetApplicationLocale());
|
||||
g_browser_process->GetApplicationLocale());
|
||||
{
|
||||
// TODO(deepak1556): Deprecate this api in favor of an
|
||||
// async version and post a non blocing task call.
|
||||
|
||||
Reference in New Issue
Block a user