aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJulian de Navascues <julian.navascues@gmail.com>2009-09-21 17:46:12 +0800
committerXan Lopez <xan@gnome.org>2009-09-22 17:46:01 +0800
commit53dc6836904c100dc75c368b9e494eaebcc63416 (patch)
tree98bcc662082829ade9f6c6e3299f89ca022e74ce /src
parent0eadd147c38a58cd235571d228e393216416cd3e (diff)
downloadgsoc2013-epiphany-53dc6836904c100dc75c368b9e494eaebcc63416.tar
gsoc2013-epiphany-53dc6836904c100dc75c368b9e494eaebcc63416.tar.gz
gsoc2013-epiphany-53dc6836904c100dc75c368b9e494eaebcc63416.tar.bz2
gsoc2013-epiphany-53dc6836904c100dc75c368b9e494eaebcc63416.tar.lz
gsoc2013-epiphany-53dc6836904c100dc75c368b9e494eaebcc63416.tar.xz
gsoc2013-epiphany-53dc6836904c100dc75c368b9e494eaebcc63416.tar.zst
gsoc2013-epiphany-53dc6836904c100dc75c368b9e494eaebcc63416.zip
Prevents PDM from getting keyring passwords in a private session
SoupSession will remember HTTP passwords during the private session but as we dont allow to delete them it doesnt make sense to show them in the dialog. Bug #591395 Signed-off-by: Xan Lopez <xan@gnome.org>
Diffstat (limited to 'src')
-rw-r--r--src/pdm-dialog.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/pdm-dialog.c b/src/pdm-dialog.c
index 1c1bac06c..39fa7b709 100644
--- a/src/pdm-dialog.c
+++ b/src/pdm-dialog.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Copyright © 2002 Jorn Baayen
* Copyright © 2003 Marco Pesenti Gritti
@@ -261,7 +262,7 @@ clear_all_dialog_response_cb (GtkDialog *dialog,
if (response == GTK_RESPONSE_OK)
{
- if (gtk_toggle_button_get_active
+ if (gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON (checkbuttons->checkbutton_history)))
{
EphyEmbedShell *shell;
@@ -1360,6 +1361,15 @@ pdm_dialog_fill_passwords_list (PdmActionInfo *info)
}
static void
+pdm_dialog_fill_passwords_list_from_soupsession_dummy (PdmActionInfo *info)
+{
+ /* Do nothing, no HTTP password will be added to PDM (in private mode) because we cant delete them.
+
+ See https://bugzilla.gnome.org/show_bug.cgi?id=591395
+ */
+}
+
+static void
pdm_dialog_passwords_destruct (PdmActionInfo *info)
{
}
@@ -1540,6 +1550,8 @@ pdm_dialog_init (PdmDialog *dialog)
PdmDialogPrivate *priv;
PdmActionInfo *cookies, *passwords;
GtkWidget *window;
+ gboolean has_private_profile = ephy_has_private_profile ();
+
priv = dialog->priv = EPHY_PDM_DIALOG_GET_PRIVATE (dialog);
@@ -1588,7 +1600,8 @@ pdm_dialog_init (PdmDialog *dialog)
passwords = g_new0 (PdmActionInfo, 1);
passwords->construct = pdm_dialog_passwords_construct;
passwords->destruct = pdm_dialog_passwords_destruct;
- passwords->fill = pdm_dialog_fill_passwords_list;
+ /* Bug 591395 : we dont show HTTP auth in private mode because we can delete or use it anyway. */
+ passwords->fill = has_private_profile ? pdm_dialog_fill_passwords_list_from_soupsession_dummy : pdm_dialog_fill_passwords_list;
passwords->add = pdm_dialog_password_add;
passwords->remove = pdm_dialog_password_remove;
passwords->dialog = dialog;