1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef mozilla_ipc_backgroundutils_h__
6 #define mozilla_ipc_backgroundutils_h__
8 #include "mozilla/Attributes.h"
20 * Convert a PrincipalInfo to an nsIPrincipal.
22 * MUST be called on the main thread only.
24 already_AddRefed
<nsIPrincipal
>
25 PrincipalInfoToPrincipal(const PrincipalInfo
& aPrincipalInfo
,
26 nsresult
* aOptionalResult
= nullptr);
29 * Convert an nsIPrincipal to a PrincipalInfo.
31 * MUST be called on the main thread only.
34 PrincipalToPrincipalInfo(nsIPrincipal
* aPrincipal
,
35 PrincipalInfo
* aPrincipalInfo
);
38 } // namespace mozilla
40 #endif // mozilla_ipc_backgroundutils_h__