mirror of
https://github.com/electron/electron.git
synced 2026-02-19 03:14:51 -05:00
chore: bump chromium to 140.0.7312.0 (38-x-y) (#47881)
* chore: bump chromium in DEPS to 140.0.7312.0 Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> * 6769540: Move NetworkTrafficAnnotationTag out of PreconnectManager. Refs https://chromium-review.googlesource.com/c/chromium/src/+/6769540 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 6771377: Roll libc++ from 3eda1e62e799 to 569aa83b4bbc (7 revisions) Refs https://chromium-review.googlesource.com/c/chromium/src/+/6771377 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 6771398: Remove unnecessary std::optional wrappers in ResolveHostClient Refs https://chromium-review.googlesource.com/c/chromium/src/+/6771398 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * chore: update patches Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * 6776165: Use shared session bus for MPRIS Refs https://chromium-review.googlesource.com/c/chromium/src/+/6776165 Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * chore: update patches --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com> Co-authored-by: patchup[bot] <73610968+patchup[bot]@users.noreply.github.com>
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include "base/uuid.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/predictors/preconnect_manager.h"
|
||||
#include "chrome/browser/predictors/predictors_traffic_annotations.h" // nogncheck
|
||||
#include "chrome/common/chrome_switches.h"
|
||||
#include "chrome/common/pref_names.h"
|
||||
#include "components/download/public/common/download_danger_type.h"
|
||||
@@ -1360,7 +1361,8 @@ static void StartPreconnectOnUI(ElectronBrowserContext* browser_context,
|
||||
{url::Origin::Create(url), num_sockets_to_preconnect,
|
||||
net::NetworkAnonymizationKey::CreateSameSite(
|
||||
net::SchemefulSite(origin))}};
|
||||
browser_context->GetPreconnectManager()->Start(url, requests);
|
||||
browser_context->GetPreconnectManager()->Start(
|
||||
url, requests, predictors::kLoadingPredictorPreconnectTrafficAnnotation);
|
||||
}
|
||||
|
||||
void Session::Preconnect(const gin_helper::Dictionary& options,
|
||||
|
||||
@@ -54,8 +54,8 @@ void ResolveHostFunction::Run() {
|
||||
receiver_.set_disconnect_handler(base::BindOnce(
|
||||
&ResolveHostFunction::OnComplete, this, net::ERR_NAME_NOT_RESOLVED,
|
||||
net::ResolveErrorInfo(net::ERR_FAILED),
|
||||
/*resolved_addresses=*/std::nullopt,
|
||||
/*endpoint_results_with_metadata=*/std::nullopt));
|
||||
/*resolved_addresses=*/net::AddressList(),
|
||||
/*endpoint_results_with_metadata=*/net::HostResolverEndpointResults()));
|
||||
if (electron::IsUtilityProcess()) {
|
||||
URLLoaderBundle::GetInstance()->GetHostResolver()->ResolveHost(
|
||||
network::mojom::HostResolverHost::NewHostPortPair(
|
||||
@@ -76,9 +76,8 @@ void ResolveHostFunction::Run() {
|
||||
void ResolveHostFunction::OnComplete(
|
||||
int result,
|
||||
const net::ResolveErrorInfo& resolve_error_info,
|
||||
const std::optional<net::AddressList>& resolved_addresses,
|
||||
const std::optional<net::HostResolverEndpointResults>&
|
||||
endpoint_results_with_metadata) {
|
||||
const net::AddressList& resolved_addresses,
|
||||
const net::HostResolverEndpointResults& endpoint_results_with_metadata) {
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
|
||||
// Ensure that we outlive the `receiver_.reset()` call.
|
||||
|
||||
@@ -51,8 +51,8 @@ class ResolveHostFunction
|
||||
// network::mojom::ResolveHostClient implementation
|
||||
void OnComplete(int result,
|
||||
const net::ResolveErrorInfo& resolve_error_info,
|
||||
const std::optional<net::AddressList>& resolved_addresses,
|
||||
const std::optional<net::HostResolverEndpointResults>&
|
||||
const net::AddressList& resolved_addresses,
|
||||
const net::HostResolverEndpointResults&
|
||||
endpoint_results_with_metadata) override;
|
||||
|
||||
SEQUENCE_CHECKER(sequence_checker_);
|
||||
|
||||
@@ -13,6 +13,9 @@
|
||||
#include "base/no_destructor.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/synchronization/atomic_flag.h"
|
||||
#include "base/task/lazy_thread_pool_task_runner.h"
|
||||
#include "base/task/single_thread_task_runner_thread_mode.h"
|
||||
#include "base/task/task_traits.h"
|
||||
#include "components/dbus/thread_linux/dbus_thread_linux.h"
|
||||
#include "components/dbus/utils/check_for_service_and_start.h"
|
||||
#include "dbus/bus.h"
|
||||
@@ -37,6 +40,13 @@ constexpr char kXdgPortalRequiredVersionFlag[] = "xdg-portal-required-version";
|
||||
|
||||
bool g_portal_available = false;
|
||||
|
||||
// Refs
|
||||
// https://source.chromium.org/chromium/chromium/src/+/main:components/dbus/thread_linux/dbus_thread_linux.cc;l=16-24;drc=1c281d7923af032d78ea7247e99b717dfebeb0b2
|
||||
base::LazyThreadPoolSingleThreadTaskRunner g_electron_dbus_thread_task_runner =
|
||||
LAZY_THREAD_POOL_SINGLE_THREAD_TASK_RUNNER_INITIALIZER(
|
||||
base::TaskTraits(base::MayBlock(), base::TaskPriority::USER_BLOCKING),
|
||||
base::SingleThreadTaskRunnerThreadMode::SHARED);
|
||||
|
||||
struct FileChooserProperties : dbus::PropertySet {
|
||||
dbus::Property<uint32_t> version;
|
||||
|
||||
@@ -61,7 +71,7 @@ void CheckPortalAvailabilityOnBusThread() {
|
||||
dbus::Bus::Options options;
|
||||
options.bus_type = dbus::Bus::SESSION;
|
||||
options.connection_type = dbus::Bus::PRIVATE;
|
||||
options.dbus_task_runner = dbus_thread_linux::GetTaskRunner();
|
||||
options.dbus_task_runner = g_electron_dbus_thread_task_runner.Get();
|
||||
scoped_refptr<dbus::Bus> bus = base::MakeRefCounted<dbus::Bus>(options);
|
||||
dbus_utils::CheckForServiceAndStart(
|
||||
bus, kXdgPortalService,
|
||||
@@ -104,7 +114,7 @@ void StartPortalAvailabilityTestInBackground() {
|
||||
VLOG(1) << "Unable to parse --xdg-portal-required-version";
|
||||
}
|
||||
|
||||
dbus_thread_linux::GetTaskRunner()->PostTask(
|
||||
g_electron_dbus_thread_task_runner.Get()->PostTask(
|
||||
FROM_HERE, base::BindOnce(&CheckPortalAvailabilityOnBusThread));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user