tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 97b3cf9813afe32e41f8002593c511b5ae8926bb
parent 1d09788fc8234e4ab0dc3b9f2a99ff66cb90e274
Author: smayya <smayya@mozilla.com>
Date:   Thu,  4 Dec 2025 07:36:29 +0000

Bug 2003559 - submit eTLD+1 telemetry for local network access daily. r=necko-reviewers,valentin

Differential Revision: https://phabricator.services.mozilla.com/D274778

Diffstat:
Mnetwerk/protocol/http/nsHttpHandler.cpp | 10+++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp @@ -73,6 +73,7 @@ #include "mozilla/net/SocketProcessChild.h" #include "mozilla/intl/LocaleService.h" #include "mozilla/ipc/URIUtils.h" +#include "mozilla/glean/GleanPings.h" #include "mozilla/glean/NetwerkProtocolHttpMetrics.h" #include "mozilla/AntiTrackingRedirectHeuristic.h" #include "mozilla/DynamicFpiRedirectHeuristic.h" @@ -508,6 +509,7 @@ nsresult nsHttpHandler::Init() { obsService->AddObserver(this, "network:socket-process-crashed", true); obsService->AddObserver(this, "network:reset_third_party_roots_check", true); + obsService->AddObserver(this, "idle-daily", true); if (!IsNeckoChild()) { obsService->AddObserver(this, "net:current-browser-id", true); @@ -2421,8 +2423,14 @@ nsHttpHandler::Observe(nsISupports* subject, const char* topic, ShutdownConnectionManager(); mConnMgr = nullptr; (void)InitConnectionMgr(); + } else if (!strcmp(topic, "idle-daily")) { + // Submit the local-network-access ping once per day + if (XRE_IsParentProcess()) { +#if defined(EARLY_BETA_OR_EARLIER) // Submit custom telemetry ping. + glean_pings::LocalNetworkAccess.Submit(); +#endif + } } - return NS_OK; }