chromium/base/process/current_process.h

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef BASE_PROCESS_CURRENT_PROCESS_H_
#define BASE_PROCESS_CURRENT_PROCESS_H_

#include <atomic>
#include <string>

#include "base/base_export.h"
#include "base/no_destructor.h"
#include "base/process/process_handle.h"
#include "base/synchronization/lock.h"
#include "base/trace_event/base_tracing.h"
#include "build/buildflag.h"

namespace tracing {
class TraceEventDataSource;
class CustomEventRecorder;
void SetProcessTrackDescriptor(int64_t process_start_timestamp);
}  // namespace tracing

namespace mojo::core {
class Channel;
}

namespace base {
namespace test {
class CurrentProcessForTest;
}  // namespace test

CurrentProcessType;

// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
// Use coalesced service process for recording histograms.
enum class ShortProcessType {};

// CurrentProcess class provides access to set of current process properties
// which are accessible only from the process itself (e.g. ProcessType,
// ProcessName).
// See base::CurrentThread for access to properties of the running
// thread and base::Process::Current for the properties which are known both
// from within and without the process (e.g. pid).
class BASE_EXPORT CurrentProcess {};

}  // namespace base

#endif  // BASE_PROCESS_CURRENT_PROCESS_H_