Bug 401174 - Allow how exthandler adds downloads to history to be overridden. r=biesi, sr=bz, a=mconnor

git-svn-id: svn://10.0.0.236/trunk@239881 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
sdwilsh%shawnwilsher.com
2007-11-23 20:20:47 +00:00
parent e7162bd756
commit 172d5c2e85
12 changed files with 462 additions and 32 deletions

View File

@@ -8509,16 +8509,9 @@ nsDocShell::AddToGlobalHistory(nsIURI * aURI, PRBool aRedirect,
if (NS_FAILED(rv))
return rv;
// Get referrer from the channel. We have to check for a property on a
// property bag because the referrer may be empty for security reasons (for
// example, when loading a http page with a https referrer).
nsCOMPtr<nsIURI> referrer;
nsCOMPtr<nsIPropertyBag2> props(do_QueryInterface(aChannel));
if (props) {
props->GetPropertyAsInterface(NS_LITERAL_STRING("docshell.internalReferrer"),
NS_GET_IID(nsIURI),
getter_AddRefs(referrer));
}
if (aChannel)
NS_GetReferrerFromChannel(aChannel, getter_AddRefs(referrer));
rv = mGlobalHistory->AddURI(aURI, aRedirect, !IsFrame(), referrer);
if (NS_FAILED(rv))