124014 r=bzbarsky sr=darin URL handled by helper app never marked visited

git-svn-id: svn://10.0.0.236/trunk@144284 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
cbiesinger%web.de
2003-06-30 19:00:46 +00:00
parent 2af7dd2328
commit 3f6a87bb86
2 changed files with 12 additions and 0 deletions

View File

@@ -62,6 +62,7 @@ REQUIRES = xpcom \
intl \
uconv \
windowwatcher \
appcomps \
$(NULL)
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))

View File

@@ -85,6 +85,8 @@
#include "nsIPrefService.h"
#include "nsIGlobalHistory.h"
#include "nsCRT.h"
#include "plstr.h"
@@ -1402,6 +1404,15 @@ NS_IMETHODIMP nsExternalAppHandler::OnStartRequest(nsIRequest *request, nsISuppo
}
}
// Now let's mark the downloaded URL as visited
nsCOMPtr<nsIGlobalHistory> history(do_GetService(NS_GLOBALHISTORY_CONTRACTID));
nsCAutoString spec;
mSourceUrl->GetSpec(spec);
if (history && !spec.IsEmpty())
{
history->AddPage(spec.get());
}
return NS_OK;
}