Bug 1835135 [Linux] Allow to override DBus application name by MOZ_DBUS_APP_NAME env variable r=emilio

Depends on D179432

Differential Revision: https://phabricator.services.mozilla.com/D179433
This commit is contained in:
stransky 2023-05-30 12:14:58 +00:00
parent 9a1b53a51b
commit fcc2718bb0

View File

@ -48,8 +48,13 @@ void XREAppData::SanitizeNameForDBus(nsACString& aName) {
}
void XREAppData::GetDBusAppName(nsACString& aName) const {
aName.Assign(remotingName);
SanitizeNameForDBus(aName);
const char* env = getenv("MOZ_DBUS_APP_NAME");
if (env) {
aName.Assign(env);
} else {
aName.Assign(remotingName);
SanitizeNameForDBus(aName);
}
}
} // namespace mozilla