summaryrefslogtreecommitdiffstats
path: root/toolkit/components/glean/xpcom/FOG.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/components/glean/xpcom/FOG.cpp')
-rw-r--r--toolkit/components/glean/xpcom/FOG.cpp27
1 files changed, 12 insertions, 15 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;
}