[Webkit-unassigned] [Bug 104910] [GTK] When in private mode WebKitGTK+ should not save HTTP authentication credentials to the persistent storage

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 14 04:00:24 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=104910





--- Comment #4 from Martin Robinson <mrobinson at webkit.org>  2012-12-14 04:02:44 PST ---
(From update of attachment 179463)
View in context: https://bugs.webkit.org/attachment.cgi?id=179463&action=review

Great patch! If you were a committer I'd r+ and have you land with a few small changes. I have just a few small aesthetic suggestions to make the code more WebKitty.

> Source/WebCore/platform/gtk/GtkAuthenticationDialog.cpp:260
> +        CredentialPersistence persistence;
> +
> +        if (rememberPassword && dialog->m_browsingMode == NormalMode)
> +            persistence = CredentialPersistencePermanent;
> +        else
> +            persistence = CredentialPersistenceForSession;

This could be one line.

> Source/WebCore/platform/gtk/GtkAuthenticationDialog.h:40
> +    enum BrowsingMode {
> +        NormalMode, // The user is asked whether to store credential information
> +        PrivateMode // Credential information is only kept in the session
> +    };

I think that it would make more sense for the authentication dialog to have no knowledge of the concept of browsing mode. Instead the naming of these could be something like:

enum PersistentStorageAllowed {
    AllowPersistentStorage,
    DisallowPersistentStorage,
}

WebKit comments that are complete sentences should end with a period, but I think it's also okay to omit the comments here since the naming is clear enough.

> Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:1622
> +    GtkAuthenticationDialog::BrowsingMode browsingMode;
> +
> +    if (webkit_settings_get_enable_private_browsing(webView->priv->settings.get()))
> +        browsingMode = GtkAuthenticationDialog::PrivateMode;
> +    else
> +        browsingMode = GtkAuthenticationDialog::NormalMode;
> +

This could probably just be one line:

PersistentStorageAllowed persistentStorage = webkit_settings_get_enable_private_browsing(webView->priv->settings.get()) ? GtkAuthenticationDialog::AllowPersistentStorage ? GtkAuthenticationDialog::DisallowPersistentStorage;

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list