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

This commit is contained in:
cbiesinger%web.de 2003-06-30 19:00:46 +00:00
Родитель b09e279a38
Коммит dd0fc2d465
2 изменённых файлов: 12 добавлений и 0 удалений

Просмотреть файл

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

Просмотреть файл

@ -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;
}