blob: e40a87d5fa1c44e9c63f2aae351d13ed9aa82051 [file] [log] [blame]
// Copyright 2022 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;
[Stable, Extensible]
enum RegistrationCodeType {
// EchoPrivate is a service used to provide trusted websites a mechanism to
// confirm the device is a ChromeOS device. Allowed users may then receive
// offers. Implemented in Ash.
[Stable, Uuid="021dafa4-ff41-42ad-9158-98d8e7f1ad6a"]
interface EchoPrivate {
// Checks TPM state to ensure the device is allowed to redeem offers. If it
// is, the user is then prompted to confirm. Returns true only if all checks
// pass.
string window_id, string service_name, string origin) => (bool allowed);
// Returns the contents of the oobe timestamp file in string format. The
// result should be considered an opaque value that is directly passed to the
// extension. Failure is reported as empty string.
GetOobeTimestamp@1() => (string timestamp);
// Returns an opaque string associated with the coupon or group type.
GetRegistrationCode@2(RegistrationCodeType type) => (string result);