aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-03-10 23:51:16 +0800
committerChristian Persch <chpe@src.gnome.org>2005-03-10 23:51:16 +0800
commit12da6d106b5acf65bbba1644d1ae8dc5ea7f91ff (patch)
treedc5737225b6281a4542d167bff763f60db00d472
parentf504e98f83935f5156f2471de1b2fc68059ab17a (diff)
downloadgsoc2013-epiphany-12da6d106b5acf65bbba1644d1ae8dc5ea7f91ff.tar
gsoc2013-epiphany-12da6d106b5acf65bbba1644d1ae8dc5ea7f91ff.tar.gz
gsoc2013-epiphany-12da6d106b5acf65bbba1644d1ae8dc5ea7f91ff.tar.bz2
gsoc2013-epiphany-12da6d106b5acf65bbba1644d1ae8dc5ea7f91ff.tar.lz
gsoc2013-epiphany-12da6d106b5acf65bbba1644d1ae8dc5ea7f91ff.tar.xz
gsoc2013-epiphany-12da6d106b5acf65bbba1644d1ae8dc5ea7f91ff.tar.zst
gsoc2013-epiphany-12da6d106b5acf65bbba1644d1ae8dc5ea7f91ff.zip
Remove the wallet hack; it appears not to work correctly using mozilla 1.7
2005-03-10 Christian Persch <chpe@cvs.gnome.org> * configure.ac: * embed/mozilla/MozillaPrivate.cpp: * embed/mozilla/MozillaPrivate.h: * embed/mozilla/mozilla-embed-single.cpp: Remove the wallet hack; it appears not to work correctly using mozilla 1.7 (work on trunk; but that's dead).
-rw-r--r--ChangeLog10
-rw-r--r--configure.ac3
-rw-r--r--embed/mozilla/MozillaPrivate.cpp61
-rw-r--r--embed/mozilla/MozillaPrivate.h4
-rw-r--r--embed/mozilla/mozilla-embed-single.cpp2
5 files changed, 10 insertions, 70 deletions
diff --git a/ChangeLog b/ChangeLog
index bcc9b4e96..8f7142a6e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2005-03-10 Christian Persch <chpe@cvs.gnome.org>
+
+ * configure.ac:
+ * embed/mozilla/MozillaPrivate.cpp:
+ * embed/mozilla/MozillaPrivate.h:
+ * embed/mozilla/mozilla-embed-single.cpp:
+
+ Remove the wallet hack; it appears not to work correctly
+ using mozilla 1.7 (work on trunk; but that's dead).
+
2005-03-09 Christian Persch <chpe@cvs.gnome.org>
* configure.ac:
diff --git a/configure.ac b/configure.ac
index 626a99714..9e243ba82 100644
--- a/configure.ac
+++ b/configure.ac
@@ -485,9 +485,6 @@ if test "x$flavour" = "xmozilla"; then
AC_CHECK_FILE([$MOZILLA_INCLUDE_ROOT/nsIPassword.h],
[AC_DEFINE([HAVE_NSIPASSWORD_H],[1],
[Define if mozilla nsIPassword header is available])])
- AC_CHECK_FILE([$MOZILLA_INCLUDE_ROOT/wallet/nsIWalletService.h],
- [AC_DEFINE([HAVE_NSIWALLETSERVICE_H],[1],
- [Define if nsIWalletService.h is available])])
elif test "x$flavour" = "xtoolkit"; then
AC_CHECK_FILE([$MOZILLA_INCLUDE_ROOT/passwordmgr/nsIPassword.h],
[AC_DEFINE([HAVE_NSIPASSWORD_H],[1],
diff --git a/embed/mozilla/MozillaPrivate.cpp b/embed/mozilla/MozillaPrivate.cpp
index 37860a502..23e8a391b 100644
--- a/embed/mozilla/MozillaPrivate.cpp
+++ b/embed/mozilla/MozillaPrivate.cpp
@@ -31,12 +31,6 @@
#include <nsISupportsPrimitives.h>
#include <nsPromiseFlatString.h>
-#ifdef HAVE_NSIWALLETSERVICE_H
-#include <nsIPrefBranch.h>
-#include <nsIDOMWindowInternal.h>
-#include <wallet/nsIWalletService.h>
-#endif
-
#include "ephy-debug.h"
/* IMPORTANT. Put only code that use internal mozilla strings (nsAutoString for
@@ -83,58 +77,3 @@ MozillaPrivate::GetPrinterList ()
return g_list_reverse (printers);
}
-
-#ifdef HAVE_NSIWALLETSERVICE_H
-
-class DummyWindow : public nsIDOMWindowInternal
-{
-public:
- DummyWindow () { LOG ("DummyWindow ctor"); };
- virtual ~DummyWindow () { LOG ("DummyWindow dtor"); };
-
- NS_DECL_ISUPPORTS
- NS_FORWARD_SAFE_NSIDOMWINDOW(mFake);
- NS_FORWARD_SAFE_NSIDOMWINDOW2(mFake2);
- NS_FORWARD_SAFE_NSIDOMWINDOWINTERNAL(mFakeInt);
-private:
- nsCOMPtr<nsIDOMWindow> mFake;
- nsCOMPtr<nsIDOMWindow2> mFake2;
- nsCOMPtr<nsIDOMWindowInternal> mFakeInt;
-};
-
-NS_IMPL_ISUPPORTS3(DummyWindow, nsIDOMWindow, nsIDOMWindow2, nsIDOMWindowInternal)
-
-#endif /* HAVE_NSIWALLETSERVICE_H */
-
-void
-MozillaPrivate::SecureWallet (nsIPrefBranch *pref)
-{
-#ifdef HAVE_NSIWALLETSERVICE_H
- nsresult rv;
- PRBool isEnabled = PR_FALSE;
- rv = pref->GetBoolPref ("wallet.crypto", &isEnabled);
- if (NS_SUCCEEDED (rv) && isEnabled) return;
-
- nsCOMPtr<nsIWalletService> wallet (do_GetService (NS_WALLETSERVICE_CONTRACTID));
- NS_ENSURE_TRUE (wallet, );
-
- /* We cannot set nsnull as callback data here, since that will crash
- * in case wallet needs to get the prompter from it (missing null check
- * in wallet code). Therefore we create a dummy impl which will just
- * always fail. There is no way to safely set nsnull after we're done,
- * so we'll just leak our dummy window.
- */
- DummyWindow *win = new DummyWindow();
- if (!win) return;
-
- nsCOMPtr<nsIDOMWindowInternal> domWinInt (do_QueryInterface (win));
- NS_ENSURE_TRUE (domWinInt, );
-
- /* WALLET_InitReencryptCallback doesN'T addref but stores the pointer! */
- NS_ADDREF (win);
- wallet->WALLET_InitReencryptCallback (domWinInt);
-
- /* Now set the pref. This will encrypt the existing data. */
- pref->SetBoolPref ("wallet.crypto", PR_TRUE);
-#endif /* HAVE_NSIWALLETSERVICE_H */
-}
diff --git a/embed/mozilla/MozillaPrivate.h b/embed/mozilla/MozillaPrivate.h
index 73ef25253..5c7c0a8d6 100644
--- a/embed/mozilla/MozillaPrivate.h
+++ b/embed/mozilla/MozillaPrivate.h
@@ -20,11 +20,7 @@
#include <glib.h>
-class nsIPrefBranch;
-
namespace MozillaPrivate
{
GList *GetPrinterList ();
-
- void SecureWallet (nsIPrefBranch *pref);
}
diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp
index 4d34511bf..d6bfbb061 100644
--- a/embed/mozilla/mozilla-embed-single.cpp
+++ b/embed/mozilla/mozilla-embed-single.cpp
@@ -245,8 +245,6 @@ mozilla_set_default_prefs (MozillaEmbedSingle *mes)
pref->SetBoolPref("network.protocol-handler.external.ftp",
have_gnome_url_handler ("ftp"));
- MozillaPrivate::SecureWallet (pref);
-
return TRUE;
}