Bumping manifests a=b2g-bump
[gecko.git] / ipc / glue / BackgroundUtils.h
blob2816bad0a14234fb8a84afeaf325eefc868b7499
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"
9 #include "nsCOMPtr.h"
10 #include "nscore.h"
12 class nsIPrincipal;
14 namespace mozilla {
15 namespace ipc {
17 class PrincipalInfo;
19 /**
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);
28 /**
29 * Convert an nsIPrincipal to a PrincipalInfo.
31 * MUST be called on the main thread only.
33 nsresult
34 PrincipalToPrincipalInfo(nsIPrincipal* aPrincipal,
35 PrincipalInfo* aPrincipalInfo);
37 } // namespace ipc
38 } // namespace mozilla
40 #endif // mozilla_ipc_backgroundutils_h__