// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// TODO(crbug.com/354842935): while this interface is originally designed
// to be used as a part of crosapi, now it is used for the communication
// with recorder_ui web app. Rework to make this turn into the dedicated
// api for the communication, and update the build rules.
module crosapi.mojom;
import "components/metrics/structured/mojom/event.mojom";
// Interface to interact with StructuredMetrics.
// Implemented by Ash-Chrome.
[Uuid="b557009a-c8b8-4bac-8055-3334c52f6dd6"]
interface StructuredMetricsService {
// Tries to record all |events|. Events sent over will be validated to ensure
// they are registered in //tools/metrics/structured/sync/structured.xml. Any
// event that is not valid will be ignored.
Record@0(array<metrics.structured.mojom.Event> events);
};