tor-browser

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

commit 674198b4005c5f03edbf02ab1b58f4f0897a691b
parent bfbaf936c132e9270a2703df33720e36643f37ee
Author: Pier Angelo Vendrame <pierov@torproject.org>
Date:   Tue,  3 Feb 2026 11:51:32 +0100

fixup! TB 2176: Rebrand Firefox to TorBrowser

BB 44050: Use org.torproject rather than org.mozilla for D-bus.

Diffstat:
Mtoolkit/components/remote/nsDBusRemoteClient.cpp | 8++++----
Mtoolkit/components/remote/nsDBusRemoteServer.cpp | 11++++++-----
2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/toolkit/components/remote/nsDBusRemoteClient.cpp b/toolkit/components/remote/nsDBusRemoteClient.cpp @@ -77,7 +77,7 @@ bool nsDBusRemoteClient::GetRemoteDestinationName(const char* aProgram, mozilla::XREAppData::SanitizeNameForDBus(profileName); aDestinationName = - nsPrintfCString("org.mozilla.%s.%s", aProgram, profileName.get()); + nsPrintfCString("org.torproject.%s.%s", aProgram, profileName.get()); if (aDestinationName.Length() > DBUS_MAXIMUM_NAME_LENGTH) aDestinationName.Truncate(DBUS_MAXIMUM_NAME_LENGTH); @@ -91,7 +91,7 @@ bool nsDBusRemoteClient::GetRemoteDestinationName(const char* aProgram, if (!sDBusValidateBusName(aDestinationName.get(), nullptr)) { // We don't have a valid busName yet - try to create a default one. aDestinationName = - nsPrintfCString("org.mozilla.%s.%s", aProgram, "default"); + nsPrintfCString("org.torproject.%s.%s", aProgram, "default"); if (!sDBusValidateBusName(aDestinationName.get(), nullptr)) { // We failed completelly to get a valid bus name - just quit // to prevent crash at dbus_bus_request_name(). @@ -122,7 +122,7 @@ nsresult nsDBusRemoteClient::DoSendDBusCommandLine(const char* aProfile, } nsAutoCString pathName; - pathName = nsPrintfCString("/org/mozilla/%s/Remote", appName.get()); + pathName = nsPrintfCString("/org/torproject/%s/Remote", appName.get()); static auto sDBusValidatePathName = (bool (*)(const char*, DBusError*))dlsym( RTLD_DEFAULT, "dbus_validate_path"); @@ -133,7 +133,7 @@ nsresult nsDBusRemoteClient::DoSendDBusCommandLine(const char* aProfile, } nsAutoCString remoteInterfaceName; - remoteInterfaceName = nsPrintfCString("org.mozilla.%s", appName.get()); + remoteInterfaceName = nsPrintfCString("org.torproject.%s", appName.get()); LOG(" DBus destination: %s\n", destinationName.get()); LOG(" DBus path: %s\n", pathName.get()); diff --git a/toolkit/components/remote/nsDBusRemoteServer.cpp b/toolkit/components/remote/nsDBusRemoteServer.cpp @@ -28,7 +28,7 @@ static const char* introspect_template = "1.0//EN\"\n" "\"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">\n" "<node>\n" - " <interface name=\"org.mozilla.%s\">\n" + " <interface name=\"org.torproject.%s\">\n" " <method name=\"OpenURL\">\n" " <arg name=\"url\" direction=\"in\" type=\"ay\"/>\n" " </method>\n" @@ -38,7 +38,7 @@ static const char* introspect_template = bool nsDBusRemoteServer::HandleOpenURL(const gchar* aInterfaceName, const gchar* aMethodName, Span<const gchar> aParam) { - nsPrintfCString ourInterfaceName("org.mozilla.%s", mAppName.get()); + nsPrintfCString ourInterfaceName("org.torproject.%s", mAppName.get()); if ((strcmp("OpenURL", aMethodName) != 0) || (strcmp(ourInterfaceName.get(), aInterfaceName) != 0)) { @@ -131,7 +131,7 @@ static const GDBusInterfaceVTable gInterfaceVTable = { HandleMethodCall, HandleGetProperty, HandleSetProperty}; void nsDBusRemoteServer::OnBusAcquired(GDBusConnection* aConnection) { - mPathName = nsPrintfCString("/org/mozilla/%s/Remote", mAppName.get()); + mPathName = nsPrintfCString("/org/torproject/%s/Remote", mAppName.get()); static auto sDBusValidatePathName = (bool (*)(const char*, DBusError*))dlsym( RTLD_DEFAULT, "dbus_validate_path"); if (!sDBusValidatePathName || @@ -205,7 +205,7 @@ nsresult nsDBusRemoteServer::Startup(const char* aAppName, mozilla::XREAppData::SanitizeNameForDBus(profileName); - nsPrintfCString busName("org.mozilla.%s.%s", mAppName.get(), + nsPrintfCString busName("org.torproject.%s.%s", mAppName.get(), profileName.get()); if (busName.Length() > DBUS_MAXIMUM_NAME_LENGTH) { busName.Truncate(DBUS_MAXIMUM_NAME_LENGTH); @@ -220,7 +220,8 @@ nsresult nsDBusRemoteServer::Startup(const char* aAppName, // We don't have a valid busName yet - try to create a default one. if (!sDBusValidateBusName(busName.get(), nullptr)) { - busName = nsPrintfCString("org.mozilla.%s.%s", mAppName.get(), "default"); + busName = + nsPrintfCString("org.torproject.%s.%s", mAppName.get(), "default"); if (!sDBusValidateBusName(busName.get(), nullptr)) { // We failed completelly to get a valid bus name - just quit // to prevent crash at dbus_bus_request_name().