echo_private.mojom 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. // Copyright 2022 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. [Stable, Extensible]
  6. enum RegistrationCodeType {
  7. kCoupon,
  8. kGroup,
  9. };
  10. // EchoPrivate is a service used to provide trusted websites a mechanism to
  11. // confirm the device is a ChromeOS device. Allowed users may then receive
  12. // offers. Implemented in Ash.
  13. [Stable, Uuid="021dafa4-ff41-42ad-9158-98d8e7f1ad6a"]
  14. interface EchoPrivate {
  15. // Checks TPM state to ensure the device is allowed to redeem offers. If it
  16. // is, the user is then prompted to confirm. Returns true only if all checks
  17. // pass.
  18. CheckRedeemOffersAllowed@0(
  19. string window_id, string service_name, string origin) => (bool allowed);
  20. // Returns the contents of the oobe timestamp file in string format. The
  21. // result should be considered an opaque value that is directly passed to the
  22. // extension. Failure is reported as empty string.
  23. [MinVersion=1]
  24. GetOobeTimestamp@1() => (string timestamp);
  25. // Returns an opaque string associated with the coupon or group type.
  26. [MinVersion=2]
  27. GetRegistrationCode@2(RegistrationCodeType type) => (string result);
  28. };