#include "chrome/browser/platform_util.h"
#include <fcntl.h>
#include <string>
#include <vector>
#include "base/callback_list.h"
#include "base/containers/contains.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/logging.h"
#include "base/memory/raw_ptr.h"
#include "base/nix/xdg_util.h"
#include "base/no_destructor.h"
#include "base/posix/eintr_wrapper.h"
#include "base/process/kill.h"
#include "base/process/launch.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/scoped_blocking_call.h"
#include "chrome/browser/lifetime/termination_notification.h"
#include "chrome/browser/platform_util_internal.h"
#include "chrome/browser/profiles/profile.h"
#include <optional>
#include "components/dbus/thread_linux/dbus_thread_linux.h"
#include "content/public/browser/browser_thread.h"
#include "dbus/bus.h"
#include "dbus/message.h"
#include "dbus/object_proxy.h"
#include "url/gurl.h"
BrowserThread;
namespace platform_util {
namespace {
const char kMethodListActivatableNames[] = …;
const char kMethodNameHasOwner[] = …;
const char kFreedesktopFileManagerName[] = …;
const char kFreedesktopFileManagerPath[] = …;
const char kMethodShowItems[] = …;
const char kFreedesktopPortalName[] = …;
const char kFreedesktopPortalPath[] = …;
const char kFreedesktopPortalOpenURI[] = …;
const char kMethodOpenDirectory[] = …;
class ShowItemHelper { … };
void OnLaunchOptionsCreated(const std::string& command,
const base::FilePath& working_directory,
const std::string& arg,
base::LaunchOptions options) { … }
void RunCommand(const std::string& command,
const base::FilePath& working_directory,
const std::string& arg) { … }
void XDGOpen(const base::FilePath& working_directory, const std::string& path) { … }
void XDGEmail(const std::string& email) { … }
}
namespace internal {
void PlatformOpenVerifiedItem(const base::FilePath& path, OpenItemType type) { … }
}
void ShowItemInFolder(Profile* profile, const base::FilePath& full_path) { … }
void OpenExternal(const GURL& url) { … }
}