aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--embed/mozilla/mozilla-embed-single.cpp15
2 files changed, 18 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index b09fae84b..d3073880c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2007-05-27 Christian Persch <chpe@gnome.org>
+ * embed/mozilla/mozilla-embed-single.cpp:
+
+ nsIPasswordManager doesn't exist on trunk anymore.
+
+2007-05-27 Christian Persch <chpe@gnome.org>
+
* lib/ephy-stock-icons.c: (ephy_stock_icons_init):
No need to make this data static.
diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp
index 3c236655f..9bc622688 100644
--- a/embed/mozilla/mozilla-embed-single.cpp
+++ b/embed/mozilla/mozilla-embed-single.cpp
@@ -44,8 +44,6 @@
#include <nsIFile.h>
#include <nsIIOService.h>
#include <nsILocalFile.h>
-#include <nsIPassword.h>
-#include <nsIPasswordManager.h>
#include <nsIPermission.h>
#include <nsIPermissionManager.h>
#include <nsIPrefService.h>
@@ -69,6 +67,11 @@
#include <nsNetCID.h>
#endif /* ALLOW_PRIVATE_API */
+#ifndef HAVE_GECKO_1_9
+#include <nsIPassword.h>
+#include <nsIPasswordManager.h>
+#endif /* !HAVE_GECKO_1_9 */
+
#include "ephy-file-helpers.h"
#include "eel-gconf-extensions.h"
#include "ephy-certificate-manager.h"
@@ -930,6 +933,7 @@ impl_list_passwords (EphyPasswordManager *manager)
{
GList *passwords = NULL;
+#ifndef HAVE_GECKO_1_9
nsresult rv;
nsCOMPtr<nsIPasswordManager> passwordManager =
do_GetService (NS_PASSWORDMANAGER_CONTRACTID);
@@ -982,6 +986,7 @@ impl_list_passwords (EphyPasswordManager *manager)
passwords = g_list_prepend (passwords, p);
}
+#endif /* !HAVE_GECKO_1_9 */
return passwords;
}
@@ -990,6 +995,7 @@ static void
impl_remove_password (EphyPasswordManager *manager,
EphyPasswordInfo *info)
{
+#ifndef HAVE_GECKO_1_9
nsCOMPtr<nsIPasswordManager> pm =
do_GetService (NS_PASSWORDMANAGER_CONTRACTID);
if (!pm) return;
@@ -1007,13 +1013,15 @@ impl_remove_password (EphyPasswordManager *manager,
NS_CStringToUTF16 (nsCString(info->username),
NS_CSTRING_ENCODING_UTF8, userName);
pm->RemoveUser (host, userName);
+#endif /* !HAVE_GECKO_1_9 */
}
static void
impl_add_password (EphyPasswordManager *manager,
EphyPasswordInfo *info)
{
- nsCOMPtr<nsIPasswordManager> pm =
+#ifndef HAVE_GECKO_1_9
+ nsCOMPtr<nsIPasswordManager> pm =
do_GetService (NS_PASSWORDMANAGER_CONTRACTID);
if (!pm) return;
@@ -1035,6 +1043,7 @@ impl_add_password (EphyPasswordManager *manager,
NS_CSTRING_ENCODING_UTF8, password);
pm->AddUser(host, username, password);
+#endif /* !HAVE_GECKO_1_9 */
}
static void