From 2efd448a8795b6b855234b184c9eea8865a196c9 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Sat, 12 Jul 2025 09:54:03 +0200 Subject: [PATCH] refactor: use `dbus_thread_linux::GetSharedSessionBus()` (#47707) refactor: use dbus_thread_linux::GetSharedSessionBus() Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr --- shell/common/platform_util_linux.cc | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/shell/common/platform_util_linux.cc b/shell/common/platform_util_linux.cc index 87c3d6fbda33..12d6dfca4001 100644 --- a/shell/common/platform_util_linux.cc +++ b/shell/common/platform_util_linux.cc @@ -76,14 +76,8 @@ class ShowItemHelper { ShowItemHelper& operator=(const ShowItemHelper&) = delete; void ShowItemInFolder(const base::FilePath& full_path) { - if (!bus_) { - // Sets up the D-Bus connection. - dbus::Bus::Options bus_options; - bus_options.bus_type = dbus::Bus::SESSION; - bus_options.connection_type = dbus::Bus::PRIVATE; - bus_options.dbus_task_runner = dbus_thread_linux::GetTaskRunner(); - bus_ = base::MakeRefCounted(bus_options); - } + if (!bus_) + bus_ = dbus_thread_linux::GetSharedSessionBus(); if (!dbus_proxy_) { dbus_proxy_ = bus_->GetObjectProxy(DBUS_SERVICE_DBUS,