chromium/third_party/blink/renderer/bindings/core/v8/v8_metrics.h

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

#ifndef THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_V8_METRICS_H_
#define THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_V8_METRICS_H_

#include "services/metrics/public/cpp/ukm_recorder.h"
#include "third_party/blink/renderer/core/core_export.h"
#include "v8/include/v8-metrics.h"

namespace blink {

// Implements a V8 metrics recorder for gathering events generated
// within the V8 engine. This is used for some UMA and all UKM
// metrics. All event handling methods in here are run in the main
// thread, so thread-safety is not an issue and is handled by the
// V8 engine.
// For UKM events, the context is used to get the source id and the
// UKM recorder.
class CORE_EXPORT V8MetricsRecorder : public v8::metrics::Recorder {};

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_V8_METRICS_H_