explicit_passphrase_mojo_utils.h 832 B

1234567891011121314151617181920212223242526
  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. #ifndef COMPONENTS_SYNC_CHROMEOS_EXPLICIT_PASSPHRASE_MOJO_UTILS_H_
  5. #define COMPONENTS_SYNC_CHROMEOS_EXPLICIT_PASSPHRASE_MOJO_UTILS_H_
  6. #include <memory>
  7. #include "chromeos/crosapi/mojom/sync.mojom.h"
  8. namespace syncer {
  9. class Nigori;
  10. // Converts |nigori| into its mojo representation.
  11. crosapi::mojom::NigoriKeyPtr NigoriToMojo(const Nigori& nigori);
  12. // Creates Nigori from its mojo representation. Returns nullptr if
  13. // |mojo_nigori_key| doesn't represent a valid Nigori.
  14. std::unique_ptr<Nigori> NigoriFromMojo(
  15. const crosapi::mojom::NigoriKey& mojo_nigori_key);
  16. } // namespace syncer
  17. #endif // COMPONENTS_SYNC_CHROMEOS_EXPLICIT_PASSPHRASE_MOJO_UTILS_H_