Pier Angelo Vendrame pushed to branch mullvad-browser-147.0a1-16.0-2 at The Tor 
Project / Applications / Mullvad Browser


Commits:
a6a3a657 by Pier Angelo Vendrame at 2026-02-03T12:03:21+01:00
fixup! MB 1: Mullvad Browser branding

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

- - - - -


2 changed files:

- toolkit/components/remote/nsDBusRemoteClient.cpp
- toolkit/components/remote/nsDBusRemoteServer.cpp


Changes:

=====================================
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("net.mullvad.%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("net.mullvad.%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("/net/mullvad/%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("net.mullvad.%s", appName.get());
 
   LOG("  DBus destination: %s\n", destinationName.get());
   LOG("  DBus path: %s\n", pathName.get());


=====================================
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=\"net.mullvad.%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("net.mullvad.%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("/net/mullvad/%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("net.mullvad.%s.%s", mAppName.get(),
                           profileName.get());
   if (busName.Length() > DBUS_MAXIMUM_NAME_LENGTH) {
     busName.Truncate(DBUS_MAXIMUM_NAME_LENGTH);
@@ -220,7 +220,7 @@ 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("net.mullvad.%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().



View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/a6a3a657494f6b8c0624d41f9ad44804112bbc3a

-- 
View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/a6a3a657494f6b8c0624d41f9ad44804112bbc3a
You're receiving this email because of your account on gitlab.torproject.org.


_______________________________________________
tor-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to