summaryrefslogtreecommitdiffstats
path: root/toolkit/components/glean/xpcom
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
commit59203c63bb777a3bacec32fb8830fba33540e809 (patch)
tree58298e711c0ff0575818c30485b44a2f21bf28a0 /toolkit/components/glean/xpcom
parentAdding upstream version 126.0.1. (diff)
downloadfirefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz
firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/glean/xpcom')
-rw-r--r--toolkit/components/glean/xpcom/FOG.cpp27
-rw-r--r--toolkit/components/glean/xpcom/nsIFOG.idl5
2 files changed, 16 insertions, 16 deletions
diff --git a/toolkit/components/glean/xpcom/FOG.cpp b/toolkit/components/glean/xpcom/FOG.cpp
index 955f2511b6..1517bd0597 100644
--- a/toolkit/components/glean/xpcom/FOG.cpp
+++ b/toolkit/components/glean/xpcom/FOG.cpp
@@ -11,7 +11,6 @@
#include "mozilla/ClearOnShutdown.h"
#include "mozilla/dom/Promise.h"
#include "mozilla/FOGIPC.h"
-#include "mozilla/browser/NimbusFeatures.h"
#include "mozilla/glean/bindings/Common.h"
#include "mozilla/glean/bindings/jog/jog_ffi_generated.h"
#include "mozilla/glean/fog_ffi_generated.h"
@@ -119,8 +118,7 @@ extern "C" bool FOG_TooLateToSend(void) {
// This allows us to pass the configurable maximum ping limit (in pings per
// minute) to Rust. Default value is 15.
extern "C" uint32_t FOG_MaxPingLimit(void) {
- return NimbusFeatures::GetInt("gleanInternalSdk"_ns,
- "gleanMaxPingsPerMinute"_ns, 15);
+ return Preferences::GetInt("telemetry.glean.internal.maxPingsPerMinute", 15);
}
// Called when knowing if we're in automation is necessary.
@@ -134,8 +132,8 @@ FOG::InitializeFOG(const nsACString& aDataPathOverride,
gInitializeCalled = true;
RunOnShutdown(
[&] {
- if (NimbusFeatures::GetBool("gleanInternalSdk"_ns, "finalInactive"_ns,
- false)) {
+ if (Preferences::GetBool("telemetry.glean.internal.finalInactive",
+ false)) {
glean::impl::fog_internal_glean_handle_client_inactive();
}
},
@@ -314,14 +312,14 @@ FOG::TestGetExperimentData(const nsACString& aExperimentId, JSContext* aCx,
}
NS_IMETHODIMP
-FOG::SetMetricsFeatureConfig(const nsACString& aJsonConfig) {
+FOG::ApplyServerKnobsConfig(const nsACString& aJsonConfig) {
#ifdef MOZ_GLEAN_ANDROID
NS_WARNING(
"Don't set metric feature configs from Gecko in Android. Ignoring.");
return NS_OK;
#else
MOZ_ASSERT(XRE_IsParentProcess());
- glean::impl::fog_set_metrics_feature_config(&aJsonConfig);
+ glean::impl::fog_apply_server_knobs_config(&aJsonConfig);
return NS_OK;
#endif
}
@@ -410,17 +408,16 @@ FOG::TestRegisterRuntimeMetric(
}
NS_IMETHODIMP
-FOG::TestRegisterRuntimePing(const nsACString& aName,
- const bool aIncludeClientId,
- const bool aSendIfEmpty,
- const bool aPreciseTimestamps,
- const bool aIncludeInfoSections,
- const nsTArray<nsCString>& aReasonCodes,
- uint32_t* aPingIdOut) {
+FOG::TestRegisterRuntimePing(
+ const nsACString& aName, const bool aIncludeClientId,
+ const bool aSendIfEmpty, const bool aPreciseTimestamps,
+ const bool aIncludeInfoSections, const bool aEnabled,
+ const nsTArray<nsCString>& aSchedulesPings,
+ const nsTArray<nsCString>& aReasonCodes, uint32_t* aPingIdOut) {
*aPingIdOut = 0;
*aPingIdOut = glean::jog::jog_test_register_ping(
&aName, aIncludeClientId, aSendIfEmpty, aPreciseTimestamps,
- aIncludeInfoSections, &aReasonCodes);
+ aIncludeInfoSections, aEnabled, &aSchedulesPings, &aReasonCodes);
return NS_OK;
}
diff --git a/toolkit/components/glean/xpcom/nsIFOG.idl b/toolkit/components/glean/xpcom/nsIFOG.idl
index 67041d6228..86409b2f6d 100644
--- a/toolkit/components/glean/xpcom/nsIFOG.idl
+++ b/toolkit/components/glean/xpcom/nsIFOG.idl
@@ -113,7 +113,7 @@ interface nsIFOG : nsISupports
* {metric_base_identifier: boolean,}
* which may contain multiple metric object entries.
*/
- void setMetricsFeatureConfig(in ACString aJsonConfig);
+ void applyServerKnobsConfig(in ACString aJsonConfig);
/**
* ** Test-only Method **
@@ -184,6 +184,7 @@ interface nsIFOG : nsISupports
* @param aSendIfEmpty - Whether the ping should send even if empty.
* @param aIncludeInfoSections - Whether the ping should include
* {client|ping}_info sections.
+ * TODO(jer): docs
* @param aReasonCodes - The list of valid reasons for ping submission.
*/
uint32_t testRegisterRuntimePing(in ACString aName,
@@ -191,5 +192,7 @@ interface nsIFOG : nsISupports
in boolean aSendIfEmpty,
in boolean aPreciseTimestamps,
in boolean aIncludeInfoSections,
+ in boolean aEnabled,
+ in Array<ACString> aSchedulesPings,
in Array<ACString> aReasonCodes);
};