mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
fix for bug 102043 - hide redirected URLs after adding them to global history
r=radha, sr=rpotts
This commit is contained in:
parent
b26867f744
commit
e404891446
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user