зеркало из https://github.com/mozilla/gecko-dev.git
124014 r=bzbarsky sr=darin URL handled by helper app never marked visited
This commit is contained in:
Родитель
b09e279a38
Коммит
dd0fc2d465
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче