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 <shelley.vohr@gmail.com>
This commit is contained in:
parent
31e6800314
commit
2efd448a87
1 changed files with 2 additions and 8 deletions
|
@ -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<dbus::Bus>(bus_options);
|
||||
}
|
||||
if (!bus_)
|
||||
bus_ = dbus_thread_linux::GetSharedSessionBus();
|
||||
|
||||
if (!dbus_proxy_) {
|
||||
dbus_proxy_ = bus_->GetObjectProxy(DBUS_SERVICE_DBUS,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue