blob: 5b444df789fa0e153d4234a5dd1f25ad81d68bb6 [file] [log] [blame]
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module crosapi.mojom;
// Interface for observers of metrics reporting consent. Implemented by
// lacros-chrome. Used by ash-chrome to send update notifications.
// Next version: 2
[Stable, Uuid="3bfcacbc-ab16-4731-9e11-3523983915d0"]
interface MetricsReportingObserver {
// Called when the metrics reporting state changes.
// If enabled is set to true, the client_id must be provided.
OnMetricsReportingChanged@0(bool enabled, [MinVersion=1] string? client_id);
// Interface for metrics reporting consent. Implemented by ash-chrome.
// Next version: 1
// Next method id: 2
[Stable, Uuid="a2336315-84ad-413f-9190-9eb2906408f6"]
interface MetricsReporting {
// Adds an observer for metrics-related state. The observer is fired
// immediately with the current state.
AddObserver@0(pending_remote<MetricsReportingObserver> observer);
// Sets the OS-level metrics reporting consent. This also affects crash
// report uploads. Lacros is allowed to do this for UX reasons. We have a
// toggle for metrics consent in lacros browser settings, in addition to the
// one in OS settings, and we want to keep both. Returns a value for possible
// future extension.
SetMetricsReportingEnabled@1(bool enabled) => ();