[epiphany] web-app: Do not send formAuthData message to Ui process in web app mode
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] web-app: Do not send formAuthData message to Ui process in web app mode
- Date: Mon, 6 Feb 2017 10:54:17 +0000 (UTC)
commit 91cecce93520e3fe0af3bc0f297d6e17fac84b9c
Author: Carlos Garcia Campos <cgarcia igalia com>
Date: Mon Feb 6 11:50:39 2017 +0100
web-app: Do not send formAuthData message to Ui process in web app mode
It's always replying without asking the user, so we don't need to ask
when we already know the answer. Simply check if it's a web app and
always allow to save the password if not explicitly denied.
embed/ephy-web-view.c | 7 -------
embed/web-extension/ephy-web-extension.c | 4 ++++
2 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 222e28b..9b16686 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -758,13 +758,6 @@ form_auth_data_save_requested (EphyEmbedShell *shell,
if (webkit_web_view_get_page_id (WEBKIT_WEB_VIEW (web_view)) != page_id)
return;
- if (ephy_embed_shell_get_mode (shell) == EPHY_EMBED_SHELL_MODE_APPLICATION) {
- ephy_web_extension_proxy_form_auth_data_save_confirmation_response (web_view->web_extension,
- request_id,
- TRUE);
- return;
- }
-
info_bar = ephy_web_view_create_form_auth_save_confirmation_info_bar (web_view, origin, username);
data = form_auth_request_data_new (web_view, request_id, origin);
g_signal_connect (info_bar, "response",
diff --git a/embed/web-extension/ephy-web-extension.c b/embed/web-extension/ephy-web-extension.c
index ac0d1ff..93998f4 100644
--- a/embed/web-extension/ephy-web-extension.c
+++ b/embed/web-extension/ephy-web-extension.c
@@ -398,6 +398,10 @@ should_store_cb (const char *username,
goto out;
}
+ /* We never ask the user in web applications. */
+ if (permission == EPHY_PERMISSION_UNDECIDED && ephy_dot_dir_is_web_application ())
+ permission = EPHY_PERMISSION_PERMIT;
+
g_object_get (ephy_embed_form_auth_get_password_node (form_auth),
"value", &password_field_value, NULL);
if (password_field_value == NULL || strlen (password_field_value) == 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]