Bug 1941046 - Part 4: Send a callback request for impression and clicks of MARS Top...
[gecko.git] / toolkit / components / telemetry / other / UntrustedModules.h
blob3bb53c1f9aca71de59666d1d1b53db87c4cae23a
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef telemetry_UntrustedModules_h__
8 #define telemetry_UntrustedModules_h__
10 #include "jsapi.h"
11 #include "mozilla/dom/Promise.h"
13 namespace mozilla {
14 namespace Telemetry {
16 /**
17 * This function returns a promise that asynchronously processes and gathers
18 * untrusted module data. The promise is either resolved with the JS object
19 * ping payload, or is rejected upon failure.
21 * @param aFlags [in] Combinations of the flags defined under nsITelemetry.
22 * (See "Flags for getUntrustedModuleLoadEvents"
23 * in nsITelemetry.idl)
25 nsresult GetUntrustedModuleLoadEvents(uint32_t aFlags, JSContext* cx,
26 dom::Promise** aPromise);
28 } // namespace Telemetry
29 } // namespace mozilla
31 #endif // telemetry_UntrustedModules_h__