blob: 1f7b5730537ff51bb6029b6e2dd1f60d6bafd32a [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]
union LoginScreenStorageRetrieveResult {
// Implies failure.
string error_message;
// Implies success.
string data;
};
// Copy of LoginScreenStorageMetadata from login_screen_storage.proto.
[Stable]
struct LoginScreenStorageMetadata {
// Whether the saved key/value pair should be deleted on session exit.
bool clear_on_session_exit@0;
};
// This API allows Lacros to store and retrieve data from the login screen
// storage.
[Stable, Uuid="ba85caf8-08f2-4404-add7-2343ea9ac943"]
interface LoginScreenStorage {
// Stores data to the login screen storage that needs to be accessible from
// multiple extensions. Each key should contain the calling extension's ID and
// the ID of the extension the data should be available from.
Store@0(array<string> keys,
LoginScreenStorageMetadata metadata,
string data) => (string? error_message);
// Retrieves the data that was previously stored for the given key.
Retrieve@1(string key) => (LoginScreenStorageRetrieveResult result);
};