aboutsummaryrefslogtreecommitdiffstats
path: root/embed/xulrunner
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@src.gnome.org>2007-11-05 07:35:28 +0800
committerCosimo Cecchi <cosimoc@src.gnome.org>2007-11-05 07:35:28 +0800
commitcce4921f040c9756af1cbc573e1a7efcebe6a02a (patch)
tree04486e048111d8259f00253471e9b952d0850ee5 /embed/xulrunner
parent42ccd4ec827aed6f2145c2a3bf5613d7c521fa77 (diff)
downloadgsoc2013-epiphany-cce4921f040c9756af1cbc573e1a7efcebe6a02a.tar
gsoc2013-epiphany-cce4921f040c9756af1cbc573e1a7efcebe6a02a.tar.gz
gsoc2013-epiphany-cce4921f040c9756af1cbc573e1a7efcebe6a02a.tar.bz2
gsoc2013-epiphany-cce4921f040c9756af1cbc573e1a7efcebe6a02a.tar.lz
gsoc2013-epiphany-cce4921f040c9756af1cbc573e1a7efcebe6a02a.tar.xz
gsoc2013-epiphany-cce4921f040c9756af1cbc573e1a7efcebe6a02a.tar.zst
gsoc2013-epiphany-cce4921f040c9756af1cbc573e1a7efcebe6a02a.zip
Add remove_all_passwords method to EphyPasswordManager and implement it
in Mozilla and XulRunner backends. Bug #476411. svn path=/trunk/; revision=7623
Diffstat (limited to 'embed/xulrunner')
-rw-r--r--embed/xulrunner/embed/mozilla-embed-single.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/embed/xulrunner/embed/mozilla-embed-single.cpp b/embed/xulrunner/embed/mozilla-embed-single.cpp
index e2236297c..ab0373085 100644
--- a/embed/xulrunner/embed/mozilla-embed-single.cpp
+++ b/embed/xulrunner/embed/mozilla-embed-single.cpp
@@ -983,6 +983,25 @@ impl_remove_password (EphyPasswordManager *manager,
}
static void
+impl_remove_all_passwords (EphyPasswordManager *manager)
+{
+ nsresult rv;
+ nsCOMPtr<nsILoginManager> loginManager =
+ do_GetService (NS_LOGINMANAGER_CONTRACTID);
+ g_return_val_if_fail (NS_SUCCEEDED (rv), NULL);
+ if (!loginManager)
+ return NULL;
+
+ nsCOMPtr<nsIIDNService> idnService
+ (do_GetService ("@mozilla.org/network/idn-service;1"));
+ NS_ENSURE_TRUE (idnService, );
+
+ rv = loginManager->RemoveAllLogins ();
+ if (NS_FAILED (rv))
+ return;
+}
+
+static void
impl_add_password (EphyPasswordManager *manager,
EphyPasswordInfo *info)
{