From fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:14:29 +0200 Subject: Merging upstream version 125.0.1. Signed-off-by: Daniel Baumann --- .../system/androidproxy/nsAndroidSystemProxySettings.cpp | 6 ++++++ toolkit/system/osxproxy/nsOSXSystemProxySettings.mm | 11 +++++++++++ toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp | 6 ++++++ .../system/windowsproxy/nsWindowsSystemProxySettings.cpp | 13 +++++++++++++ 4 files changed, 36 insertions(+) (limited to 'toolkit/system') diff --git a/toolkit/system/androidproxy/nsAndroidSystemProxySettings.cpp b/toolkit/system/androidproxy/nsAndroidSystemProxySettings.cpp index e60d0f3821..15dabfe14f 100644 --- a/toolkit/system/androidproxy/nsAndroidSystemProxySettings.cpp +++ b/toolkit/system/androidproxy/nsAndroidSystemProxySettings.cpp @@ -43,6 +43,12 @@ nsresult nsAndroidSystemProxySettings::GetProxyForURI(const nsACString& aSpec, aPort, aResult); } +NS_IMETHODIMP +nsAndroidSystemProxySettings::GetSystemWPADSetting(bool* aSystemWPADSetting) { + *aSystemWPADSetting = false; + return NS_OK; +} + void test(){}; NS_IMPL_COMPONENT_FACTORY(nsAndroidSystemProxySettings) { diff --git a/toolkit/system/osxproxy/nsOSXSystemProxySettings.mm b/toolkit/system/osxproxy/nsOSXSystemProxySettings.mm index b1ad41ccc1..27c7b47148 100644 --- a/toolkit/system/osxproxy/nsOSXSystemProxySettings.mm +++ b/toolkit/system/osxproxy/nsOSXSystemProxySettings.mm @@ -68,6 +68,12 @@ nsOSXSystemProxySettings::GetMainThreadOnly(bool* aMainThreadOnly) { return NS_OK; } +NS_IMETHODIMP +nsOSXSystemProxySettings::GetSystemWPADSetting(bool* aSystemWPADSetting) { + *aSystemWPADSetting = false; + return NS_OK; +} + // Mapping of URI schemes to SystemConfiguration keys const nsOSXSystemProxySettings::SchemeMapping nsOSXSystemProxySettings::gSchemeMappingList[] = { @@ -399,6 +405,11 @@ OSXSystemProxySettingsAsync::GetPACURI(nsACString& aResult) { return NS_OK; } +NS_IMETHODIMP +OSXSystemProxySettingsAsync::GetSystemWPADSetting(bool* aSystemWPADSetting) { + return nsOSXSystemProxySettings::GetSystemWPADSetting(aSystemWPADSetting); +} + NS_IMETHODIMP OSXSystemProxySettingsAsync::GetProxyForURI(const nsACString& aSpec, const nsACString& aScheme, diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp index 1b6d6223c4..4c84041ef3 100644 --- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp +++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp @@ -398,6 +398,12 @@ nsresult nsUnixSystemProxySettings::GetProxyForURI(const nsACString& aSpec, return GetProxyFromEnvironment(aScheme, aHost, aPort, aResult); } +NS_IMETHODIMP +nsUnixSystemProxySettings::GetSystemWPADSetting(bool* aSystemWPADSetting) { + *aSystemWPADSetting = false; + return NS_OK; +} + NS_IMPL_COMPONENT_FACTORY(nsUnixSystemProxySettings) { auto result = MakeRefPtr(); result->Init(); diff --git a/toolkit/system/windowsproxy/nsWindowsSystemProxySettings.cpp b/toolkit/system/windowsproxy/nsWindowsSystemProxySettings.cpp index 7921cb60a2..94487505c3 100644 --- a/toolkit/system/windowsproxy/nsWindowsSystemProxySettings.cpp +++ b/toolkit/system/windowsproxy/nsWindowsSystemProxySettings.cpp @@ -241,6 +241,19 @@ nsresult nsWindowsSystemProxySettings::GetProxyForURI(const nsACString& aSpec, return NS_OK; } +NS_IMETHODIMP nsWindowsSystemProxySettings::GetSystemWPADSetting( + bool* aSystemWPADSetting) { + nsresult rv; + uint32_t flags = 0; + nsAutoString buf; + + rv = ReadInternetOption(INTERNET_PER_CONN_AUTOCONFIG_URL, flags, buf); + *aSystemWPADSetting = + (flags & (PROXY_TYPE_AUTO_PROXY_URL | PROXY_TYPE_AUTO_DETECT)) == + PROXY_TYPE_AUTO_DETECT; + return rv; +} + NS_IMPL_COMPONENT_FACTORY(nsWindowsSystemProxySettings) { return mozilla::MakeAndAddRef() .downcast(); -- cgit v1.2.3