From 3f6a87bb860b50297c576f6675cc1b2150a4c2c2 Mon Sep 17 00:00:00 2001 From: "cbiesinger%web.de" Date: Mon, 30 Jun 2003 19:00:46 +0000 Subject: [PATCH] 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 --- mozilla/uriloader/exthandler/Makefile.in | 1 + .../exthandler/nsExternalHelperAppService.cpp | 11 +++++++++++ 2 files changed, 12 insertions(+) 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; }