diff --git a/src/pdm-dialog.c b/src/pdm-dialog.c
index 4c2bd6c..41d57c8 100644
--- a/src/pdm-dialog.c
+++ b/src/pdm-dialog.c
@@ -982,12 +982,68 @@ pdm_dialog_cookie_remove (PdmActionInfo *info,
 	ephy_cookie_manager_remove_cookie (manager, cookie);
 }
 
+static gboolean
+pdm_dialog_remove_all_confirmation (PdmActionInfo *info,
+				    int item)
+{
+	GtkWidget *dialog, *button, *image, *parent;
+	gboolean answer;
+	gchar *title, *message;
+
+	switch (item)
+	{
+		case PROP_PASSWORDS_REMOVE_ALL:
+			title = g_strdup (_("Remove all passwords?"));
+			message = g_strdup (_("Do you really want to remove all stored passwords?"));
+			break;
+		case PROP_COOKIES_REMOVE_ALL:
+			title = g_strdup (_("Remove all cookies?"));
+			message = g_strdup (_("Do you really want to remove all stored cookies?"));
+			break;
+		default:
+			return FALSE;
+	}
+
+	parent = ephy_dialog_get_control (EPHY_DIALOG(info->dialog),
+					  properties[PROP_WINDOW].id);
+
+	dialog = gtk_message_dialog_new (GTK_WINDOW (parent),
+					 GTK_DIALOG_DESTROY_WITH_PARENT,
+					 GTK_MESSAGE_WARNING,
+					 GTK_BUTTONS_CANCEL,
+					 message);
+
+	button = gtk_button_new_with_label (_("Remove _All"));
+	image = gtk_image_new_from_stock (GTK_STOCK_CLEAR, GTK_ICON_SIZE_BUTTON);
+	gtk_button_set_image (GTK_BUTTON (button), image);
+	/* don't show the image! see bug #307818 */
+	/* FIXME: This bug is fixed. There's another occurrence, grep for the bugnumber */
+	gtk_widget_show (button);
+
+	gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_ACCEPT);
+	gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CANCEL);
+
+	gtk_window_set_title (GTK_WINDOW (dialog), title);
+	gtk_window_set_icon_name (GTK_WINDOW (dialog), EPHY_STOCK_EPHY);
+
+	answer = gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT;
+
+	gtk_widget_destroy (dialog);
+	g_free (title);
+	g_free (message);
+
+	return answer;
+}
+
 static void
 pdm_dialog_cookie_remove_all (PdmActionInfo *info,
 			      gpointer data)
 {
 	EphyCookieManager *manager;
 
+	if (pdm_dialog_remove_all_confirmation (info, PROP_COOKIES_REMOVE_ALL) == FALSE)
+		return;
+
 	manager = EPHY_COOKIE_MANAGER (ephy_embed_shell_get_embed_single
 			(EPHY_EMBED_SHELL (ephy_shell)));
 
@@ -1230,6 +1286,9 @@ pdm_dialog_password_remove_all (PdmActionInfo *info,
 {
 	EphyPasswordManager *manager;
 
+	if (pdm_dialog_remove_all_confirmation (info, PROP_PASSWORDS_REMOVE_ALL) == FALSE)
+		return;
+
 	manager = EPHY_PASSWORD_MANAGER (ephy_embed_shell_get_embed_single
 			(EPHY_EMBED_SHELL (ephy_shell)));
 
