#include "components/metrics/histogram_controller.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/metrics/histogram_functions.h"
#include "base/metrics/histogram_macros.h"
#include "base/process/process_handle.h"
#include "base/rand_util.h"
#include "components/metrics/histogram_subscriber.h"
#include "components/metrics/public/mojom/histogram_fetcher.mojom.h"
#include "mojo/public/cpp/bindings/callback_helpers.h"
namespace metrics {
namespace {
const char* GetPingHistogramName(mojom::UmaPingCallSource call_source) { … }
}
struct HistogramController::ChildHistogramFetcher { … };
HistogramController* HistogramController::GetInstance() { … }
HistogramController::HistogramController() : … { … }
HistogramController::~HistogramController() = default;
void HistogramController::Register(HistogramSubscriber* subscriber) { … }
void HistogramController::Unregister(const HistogramSubscriber* subscriber) { … }
void HistogramController::NotifyChildDied(HistogramChildProcess* host) { … }
void HistogramController::SetHistogramMemory(
HistogramChildProcess* host,
base::UnsafeSharedMemoryRegion shared_region,
ChildProcessMode mode) { … }
void HistogramController::InsertChildHistogramFetcherInterface(
HistogramChildProcess* host,
mojo::Remote<mojom::ChildHistogramFetcher> child_histogram_fetcher,
ChildProcessMode mode) { … }
void HistogramController::PingChildProcesses() { … }
void HistogramController::PingChildProcess(
mojom::ChildHistogramFetcherProxy* fetcher,
mojom::UmaPingCallSource call_source) { … }
void HistogramController::Pong(mojom::UmaPingCallSource call_source) { … }
void HistogramController::RemoveChildHistogramFetcherInterface(
MayBeDangling<HistogramChildProcess> host) { … }
void HistogramController::GetHistogramData(int sequence_number) { … }
void HistogramController::OnHistogramDataCollected(
int sequence_number,
const std::vector<std::string>& pickled_histograms) { … }
}