Example #1
0
        internal void RegisterPingType(PingTypeBase pingType)
        {
            if (IsInitialized())
            {
                LibGleanFFI.glean_register_ping_type(
                    pingType.handle
                    );
            }

            // We need to keep track of pings, so they get re-registered after a reset.
            // This state is kept across Glean resets, which should only ever happen in test mode.
            // Or by the instrumentation tests (`connectedAndroidTest`), which relaunches the application activity,
            // but not the whole process, meaning globals, such as the ping types, still exist from the old run.
            // It's a set and keeping them around forever should not have much of an impact.

            pingTypeQueue.Add(pingType);
        }
Example #2
0
 /// <summary>
 /// Collect and submit a ping for eventual upload.
 ///
 /// The ping content is assembled as soon as possible, but upload is not
 /// guaranteed to happen immediately, as that depends on the upload
 /// policies.
 ///
 /// If the ping currently contains no content, it will not be assembled and
 /// queued for sending.
 /// </summary>
 /// <param name="ping">Ping to submit.</param>
 /// <param name="reason">The reason the ping is being submitted.</param>
 internal void SubmitPing(PingTypeBase ping, string reason = null)
 {
     SubmitPingByName(ping.name, reason);
 }