metrics_reporting.mojom 1.4 KB

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