login_screen_storage.mojom 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  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]
  6. union LoginScreenStorageRetrieveResult {
  7. // Implies failure.
  8. string error_message;
  9. // Implies success.
  10. string data;
  11. };
  12. // Copy of LoginScreenStorageMetadata from login_screen_storage.proto.
  13. [Stable]
  14. struct LoginScreenStorageMetadata {
  15. // Whether the saved key/value pair should be deleted on session exit.
  16. bool clear_on_session_exit@0;
  17. };
  18. // This API allows Lacros to store and retrieve data from the login screen
  19. // storage.
  20. [Stable, Uuid="ba85caf8-08f2-4404-add7-2343ea9ac943"]
  21. interface LoginScreenStorage {
  22. // Stores data to the login screen storage that needs to be accessible from
  23. // multiple extensions. Each key should contain the calling extension's ID and
  24. // the ID of the extension the data should be available from.
  25. Store@0(array<string> keys,
  26. LoginScreenStorageMetadata metadata,
  27. string data) => (string? error_message);
  28. // Retrieves the data that was previously stored for the given key.
  29. Retrieve@1(string key) => (LoginScreenStorageRetrieveResult result);
  30. };