Bug 138828 - [GTK] Add API to override the default local storage directory
Summary: [GTK] Add API to override the default local storage directory
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on: 138826
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-18 03:17 PST by Carlos Garcia Campos
Modified: 2014-11-23 23:23 PST (History)
4 users (show)

See Also:


Attachments
Patch (8.06 KB, patch)
2014-11-18 03:22 PST, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff
It should apply now (8.06 KB, patch)
2014-11-18 06:39 PST, Carlos Garcia Campos
gustavo: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2014-11-18 03:17:57 PST
It's currently not possible to override the default local storage directory, so that all webkitgtk applications are storing the local storage data in the same directory. This is particularly problematic for private instances like incognito mode. See https://bugzilla.gnome.org/show_bug.cgi?id=738720.
This depends on bug #138826, since the local storage directory path is a construct only configuration, it's not possible to override that for the default web context.
Comment 1 Carlos Garcia Campos 2014-11-18 03:22:05 PST
Created attachment 241778 [details]
Patch
Comment 2 Carlos Garcia Campos 2014-11-18 06:39:31 PST
Created attachment 241787 [details]
It should apply now
Comment 3 WebKit Commit Bot 2014-11-18 06:42:21 PST
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 4 Gustavo Noronha (kov) 2014-11-21 05:31:54 PST
Comment on attachment 241787 [details]
It should apply now

View in context: https://bugs.webkit.org/attachment.cgi?id=241787&action=review

So no convenience _new? I think that is ok, but worth noting so you can consider =)

> Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp:255
> +    WebKitWebContext* webContext = WEBKIT_WEB_CONTEXT(object);
> +    WebKitWebContextPrivate* priv = webContext->priv;

It doesn't hurt my eyes, but this should move to before the priv->localStorageDictory.isNull check in theory.

> Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebContext.cpp:42
> +    // Local Sorage Directory.

This doesn't add much information, I'd do away with it - the variable name is enough documentation.
Comment 5 Carlos Garcia Campos 2014-11-23 23:23:52 PST
Committed r176512: <http://trac.webkit.org/changeset/176512>