fix for bug 102043 - hide redirected URLs after adding them to global history

r=radha, sr=rpotts
This commit is contained in:
alecf%netscape.com 2001-11-19 20:22:14 +00:00
parent b26867f744
commit e404891446

View File

@ -3327,6 +3327,19 @@ nsDocShell::OnStateChange(nsIWebProgress * aProgress, nsIRequest * aRequest,
ShouldAddToGlobalHistory(uri, &updateHistory);
if (updateHistory) {
AddToGlobalHistory(uri);
// this is a redirect, so hide the page from
// being enumerated in history
// this is temporary until bug 71482 is fixed
if (mGlobalHistory) {
nsCOMPtr<nsIBrowserHistory> browserHistory =
do_QueryInterface(mGlobalHistory);
if (browserHistory) {
nsXPIDLCString urlString;
if (NS_SUCCEEDED(uri->GetSpec(getter_Copies(urlString))))
browserHistory->HidePage(urlString);
}
}
}
} // uri
} // channel