mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 07:15:46 +00:00
Bug 266413 - Automatic Proxy Configuration URL string is imported from IE, but radio button is still on Direct Connection, patch by Bevan Collins <bevan.collins@gmail.com>, r=gavin
This commit is contained in:
parent
622e008513
commit
e2d397a963
@ -1894,6 +1894,8 @@ nsIEProfileMigrator::CopyProxyPreferences(nsIPrefBranch* aPrefs)
|
||||
NS_SUCCEEDED(regKey->Open(nsIWindowsRegKey::ROOT_KEY_CURRENT_USER,
|
||||
key, nsIWindowsRegKey::ACCESS_READ))) {
|
||||
nsAutoString buf;
|
||||
|
||||
PRUint32 proxyType = 0;
|
||||
// If there's an autoconfig URL specified in the registry at all,
|
||||
// it is being used.
|
||||
if (NS_SUCCEEDED(regKey->
|
||||
@ -1901,14 +1903,18 @@ nsIEProfileMigrator::CopyProxyPreferences(nsIPrefBranch* aPrefs)
|
||||
// make this future-proof (MS IE will support IDN eventually and
|
||||
// 'URL' will contain more than ASCII characters)
|
||||
SetUnicharPref("network.proxy.autoconfig_url", buf, aPrefs);
|
||||
aPrefs->SetIntPref("network.proxy.type", 2);
|
||||
proxyType = 2;
|
||||
}
|
||||
|
||||
// ProxyEnable
|
||||
PRUint32 enabled;
|
||||
if (NS_SUCCEEDED(regKey->
|
||||
ReadIntValue(NS_LITERAL_STRING("ProxyEnable"), &enabled)))
|
||||
aPrefs->SetIntPref("network.proxy.type", (enabled & 0x1) ? 1 : 0);
|
||||
ReadIntValue(NS_LITERAL_STRING("ProxyEnable"), &enabled))) {
|
||||
if (enabled & 0x1)
|
||||
proxyType = 1;
|
||||
}
|
||||
|
||||
aPrefs->SetIntPref("network.proxy.type", proxyType);
|
||||
|
||||
if (NS_SUCCEEDED(regKey->
|
||||
ReadStringValue(NS_LITERAL_STRING("ProxyOverride"), buf)))
|
||||
|
Loading…
Reference in New Issue
Block a user