зеркало из https://github.com/mozilla/pjs.git
Bug 422172 - ""Automatic proxy configuration URL" reload button does not work" [p=hugues.fournier@gmail.com (Hugues Fournier) r+sr=biesi a1.9=beltzner]
This commit is contained in:
Родитель
35370f62af
Коммит
09cecf8fe4
|
@ -498,7 +498,7 @@ nsProtocolProxyService::PrefsChanged(nsIPrefBranch *prefBranch,
|
||||||
mSystemProxySettings->GetPACURI(tempString);
|
mSystemProxySettings->GetPACURI(tempString);
|
||||||
}
|
}
|
||||||
if (!tempString.IsEmpty())
|
if (!tempString.IsEmpty())
|
||||||
ConfigureFromPAC(tempString);
|
ConfigureFromPAC(tempString, PR_FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -758,7 +758,8 @@ nsProtocolProxyService::IsProxyDisabled(nsProxyInfo *pi)
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsProtocolProxyService::ConfigureFromPAC(const nsCString &spec)
|
nsProtocolProxyService::ConfigureFromPAC(const nsCString &spec,
|
||||||
|
PRBool forceReload)
|
||||||
{
|
{
|
||||||
if (!mPACMan) {
|
if (!mPACMan) {
|
||||||
mPACMan = new nsPACMan();
|
mPACMan = new nsPACMan();
|
||||||
|
@ -771,7 +772,7 @@ nsProtocolProxyService::ConfigureFromPAC(const nsCString &spec)
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
|
||||||
if (mPACMan->IsPACURI(pacURI))
|
if (mPACMan->IsPACURI(pacURI) && !forceReload)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
mFailedProxies.Clear();
|
mFailedProxies.Clear();
|
||||||
|
@ -826,7 +827,7 @@ nsProtocolProxyService::ReloadPAC()
|
||||||
pacSpec.AssignLiteral(WPAD_URL);
|
pacSpec.AssignLiteral(WPAD_URL);
|
||||||
|
|
||||||
if (!pacSpec.IsEmpty())
|
if (!pacSpec.IsEmpty())
|
||||||
ConfigureFromPAC(pacSpec);
|
ConfigureFromPAC(pacSpec, PR_TRUE);
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1256,7 +1257,7 @@ nsProtocolProxyService::Resolve_Internal(nsIURI *uri,
|
||||||
!PACURI.IsEmpty()) {
|
!PACURI.IsEmpty()) {
|
||||||
// Switch to new PAC file if that setting has changed. If the setting
|
// Switch to new PAC file if that setting has changed. If the setting
|
||||||
// hasn't changed, ConfigureFromPAC will exit early.
|
// hasn't changed, ConfigureFromPAC will exit early.
|
||||||
nsresult rv = ConfigureFromPAC(PACURI);
|
nsresult rv = ConfigureFromPAC(PACURI, PR_FALSE);
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -114,7 +114,7 @@ protected:
|
||||||
* @param pacURI
|
* @param pacURI
|
||||||
* The URI spec of the PAC file to load.
|
* The URI spec of the PAC file to load.
|
||||||
*/
|
*/
|
||||||
NS_HIDDEN_(nsresult) ConfigureFromPAC(const nsCString &pacURI);
|
NS_HIDDEN_(nsresult) ConfigureFromPAC(const nsCString &pacURI, PRBool forceReload);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method builds a list of nsProxyInfo objects from the given PAC-
|
* This method builds a list of nsProxyInfo objects from the given PAC-
|
||||||
|
|
Загрузка…
Ссылка в новой задаче