#include "base/files/file_util.h"
#include "base/files/platform_file.h"
#include "base/memory/ref_counted.h"
#include "base/posix/eintr_wrapper.h"
#include "base/task/thread_pool.h"
#include "base/types/expected.h"
#include "build/build_config.h"
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/un.h>
#include <unistd.h>
#include "base/check.h"
#include "base/functional/bind.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
#include "services/tracing/public/cpp/system_tracing_service.h"
#include "third_party/perfetto/include/perfetto/tracing/default_socket.h"
namespace tracing {
namespace {
class ProducerSocketConnector
: public base::RefCountedThreadSafe<ProducerSocketConnector> { … };
}
SystemTracingService::SystemTracingService() = default;
SystemTracingService::~SystemTracingService() = default;
mojo::PendingRemote<mojom::SystemTracingService>
SystemTracingService::BindAndPassPendingRemote() { … }
void SystemTracingService::OnConnectionError() { … }
void SystemTracingService::OpenProducerSocket(
OpenProducerSocketCallback callback) { … }
void SystemTracingService::OpenProducerSocketForTesting(
OpenProducerSocketCallback callback,
OnConnectCallback on_connect_callback) { … }
}