зеркало из https://github.com/mozilla/pjs.git
Adding a stub security dialog implementation. the default behaviour will not warn the user about ssl content errors (mixed content, ect.
This commit is contained in:
Родитель
8dd4a21f65
Коммит
a8c237a76c
|
@ -76,6 +76,7 @@ REQUIRES = xpcom \
|
|||
profdirserviceprovider \
|
||||
pref \
|
||||
pipnss \
|
||||
pipboot \
|
||||
intl \
|
||||
embedcomponents \
|
||||
appcomps \
|
||||
|
|
|
@ -43,9 +43,12 @@
|
|||
#include "nsStaticComponents.h"
|
||||
#endif
|
||||
|
||||
#include "nsISecurityWarningDialogs.h"
|
||||
|
||||
#define MINIMO_PROPERTIES_URL "chrome://minimo/locale/minimo.properties"
|
||||
|
||||
// Global variables
|
||||
|
||||
const static char* start_url = "chrome://minimo/content/minimo.xul";
|
||||
|
||||
//const static char* start_url = "http://www.mozilla.org";
|
||||
|
@ -387,9 +390,77 @@ nsBadCertListener::NotifyCrlNextupdate(nsIInterfaceRequestor *socketInfo, const
|
|||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef WINCE
|
||||
|
||||
class nsSecurityWarningDialogs : public nsISecurityWarningDialogs
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSISECURITYWARNINGDIALOGS
|
||||
|
||||
nsSecurityWarningDialogs();
|
||||
|
||||
private:
|
||||
~nsSecurityWarningDialogs();
|
||||
};
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsSecurityWarningDialogs, nsISecurityWarningDialogs)
|
||||
|
||||
nsSecurityWarningDialogs::nsSecurityWarningDialogs()
|
||||
{
|
||||
}
|
||||
|
||||
nsSecurityWarningDialogs::~nsSecurityWarningDialogs()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSecurityWarningDialogs::ConfirmEnteringSecure(nsIInterfaceRequestor *ctx, PRBool *_retval)
|
||||
{
|
||||
*_retval = PR_TRUE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSecurityWarningDialogs::ConfirmEnteringWeak(nsIInterfaceRequestor *ctx, PRBool *_retval)
|
||||
{
|
||||
*_retval = PR_TRUE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSecurityWarningDialogs::ConfirmLeavingSecure(nsIInterfaceRequestor *ctx, PRBool *_retval)
|
||||
{
|
||||
*_retval = PR_TRUE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSecurityWarningDialogs::ConfirmMixedMode(nsIInterfaceRequestor *ctx, PRBool *_retval)
|
||||
{
|
||||
*_retval = PR_TRUE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSecurityWarningDialogs::ConfirmPostToInsecure(nsIInterfaceRequestor *ctx, PRBool *_retval)
|
||||
{
|
||||
*_retval = PR_TRUE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSecurityWarningDialogs::ConfirmPostToInsecureFromSecure(nsIInterfaceRequestor *ctx, PRBool *_retval)
|
||||
{
|
||||
*_retval = PR_TRUE;
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
nsresult StartupProfile()
|
||||
{
|
||||
NS_TIMELINE_MARK_FUNCTION("Profile Startup");
|
||||
|
@ -443,6 +514,14 @@ void DoPreferences()
|
|||
{0xbf, 0x12, 0x45, 0x81, 0xa0, 0x3f, 0x96, 0x6e} \
|
||||
}
|
||||
|
||||
#define NS_SECURITYWARNINGDIALOGS_CID \
|
||||
{ /* 8d995d4f-adcc-4159-b7f1-e94af72eeb88 */ \
|
||||
0x8d995d4f, \
|
||||
0xadcc, \
|
||||
0x4159, \
|
||||
{0xb7, 0xf1, 0xe9, 0x4a, 0xf7, 0x2e, 0xeb, 0x88} \
|
||||
}
|
||||
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBrowserInstance)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBrowserStatusFilter)
|
||||
|
@ -452,6 +531,12 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsFullScreen)
|
|||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBadCertListener)
|
||||
#endif
|
||||
|
||||
#ifdef WINCE
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSecurityWarningDialogs)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
static const nsModuleComponentInfo defaultAppComps[] = {
|
||||
{
|
||||
NS_BROWSERSTATUSFILTER_CLASSNAME,
|
||||
|
@ -481,6 +566,15 @@ static const nsModuleComponentInfo defaultAppComps[] = {
|
|||
nsBadCertListenerConstructor
|
||||
},
|
||||
#endif
|
||||
|
||||
#ifdef WINCE
|
||||
{
|
||||
"PSM Security Warnings",
|
||||
NS_SECURITYWARNINGDIALOGS_CID,
|
||||
NS_SECURITYWARNINGDIALOGS_CONTRACTID,
|
||||
nsSecurityWarningDialogsConstructor
|
||||
},
|
||||
#endif
|
||||
};
|
||||
|
||||
void OverrideComponents()
|
||||
|
|
Загрузка…
Ссылка в новой задаче