diff --git a/mozilla/uriloader/exthandler/Makefile.in b/mozilla/uriloader/exthandler/Makefile.in index a757623077b..d84dae4b451 100644 --- a/mozilla/uriloader/exthandler/Makefile.in +++ b/mozilla/uriloader/exthandler/Makefile.in @@ -62,6 +62,7 @@ REQUIRES = xpcom \ intl \ uconv \ windowwatcher \ + appcomps \ $(NULL) ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT))) diff --git a/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp b/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp index af223d5f29c..24858350a7c 100644 --- a/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp +++ b/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp @@ -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 history(do_GetService(NS_GLOBALHISTORY_CONTRACTID)); + nsCAutoString spec; + mSourceUrl->GetSpec(spec); + if (history && !spec.IsEmpty()) + { + history->AddPage(spec.get()); + } + return NS_OK; }