<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>15692</bug_id>
          
          <creation_ts>2007-10-25 12:25:05 -0700</creation_ts>
          <short_desc>Gtk Api to check database support and change the path</short_desc>
          <delta_ts>2009-09-07 03:25:59 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>523.x (Safari 3)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Gtk</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>27899</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Christian Dywan">christian</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>gustavo</cc>
    
    <cc>jmalonzo</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>59458</commentid>
    <comment_count>0</comment_count>
    <who name="Christian Dywan">christian</who>
    <bug_when>2007-10-25 12:25:05 -0700</bug_when>
    <thetext>The new database storage feature stores databases hidden in the folder $XDG_DATA_HOME/webkit/databases. There is no api to test wether the feature is available at all or to to change the path respectively.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59460</commentid>
    <comment_count>1</comment_count>
      <attachid>16863</attachid>
    <who name="Christian Dywan">christian</who>
    <bug_when>2007-10-25 12:31:21 -0700</bug_when>
    <thetext>Created attachment 16863
A proposal of a possible api

This patch implements webkit_has_database and webkit_set_database_path. This concept is a bit unusual for Gtk+ and not necessarily what we want. Discussion about this is very welcome, especially if you have concrete plans to use this feature.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59572</commentid>
    <comment_count>2</comment_count>
    <who name="Jan Alonzo">jmalonzo</who>
    <bug_when>2007-10-26 14:02:01 -0700</bug_when>
    <thetext>*** Bug 15612 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88408</commentid>
    <comment_count>3</comment_count>
    <who name="Kalle Vahlman">zuh</who>
    <bug_when>2008-08-13 10:34:00 -0700</bug_when>
    <thetext>The settings API in WebKit-GTK+ seems to be unsuitable for this, since the path is (as far as I can tell from the code) expected to be a global. There isn&apos;t a global version of the settings API (that I know of) but looks like this is at least one instance where we would need one.

One improvement over the current one might be to use g_get_prgname() instead of hard-coded &quot;webkit&quot; in order to not clash between eg. a browser and some other application using WebKit. It&apos;s already used in the UA string generation for example, which btw is another candidate for global setting (though maybe that would have use-cases for per-view configuration). Third one I can think of is some cache settings.

I&apos;ll refresh the patch to be applyable and move it to webkitprivate.h (there seems to be some other API which is under discussion too), but just to allow people to easily import it if they need the functionality, not for inclusion.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88410</commentid>
    <comment_count>4</comment_count>
    <who name="Christian Dywan">christian</who>
    <bug_when>2008-08-13 10:47:19 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; One improvement over the current one might be to use g_get_prgname() instead of
&gt; hard-coded &quot;webkit&quot; in order to not clash between eg. a browser and some other
&gt; application using WebKit. It&apos;s already used in the UA string generation for
&gt; example, which btw is another candidate for global setting (though maybe that
&gt; would have use-cases for per-view configuration). Third one I can think of is
&gt; some cache settings.

I have to disagree with using g_get_prgname(). Usually we want to share things like this. While it should be an optional feature to use for instance databases only in the context of one application, it&apos;s not normally very helpful.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88415</commentid>
    <comment_count>5</comment_count>
    <who name="Kalle Vahlman">zuh</who>
    <bug_when>2008-08-13 11:19:01 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; (In reply to comment #3)
&gt; &gt; One improvement over the current one might be to use g_get_prgname() instead of
&gt; &gt; hard-coded &quot;webkit&quot; in order to not clash between eg. a browser and some other
&gt; &gt; application using WebKit. It&apos;s already used in the UA string generation for
&gt; &gt; example, which btw is another candidate for global setting (though maybe that
&gt; &gt; would have use-cases for per-view configuration). Third one I can think of is
&gt; &gt; some cache settings.
&gt; 
&gt; I have to disagree with using g_get_prgname(). Usually we want to share things
&gt; like this. While it should be an optional feature to use for instance databases
&gt; only in the context of one application, it&apos;s not normally very helpful.

Hmm, I suppose you are right. I can imagine for example an music store using the storage area in view embedded in a music application and in a browser session.

Then there&apos;s also the question of when this is allowed to be changed? At least it&apos;ll ASSERT if a database is open at the time, but does it make any sense to change it after application startup?
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>113867</commentid>
    <comment_count>6</comment_count>
    <who name="Gustavo Noronha (kov)">gustavo</who>
    <bug_when>2009-03-16 07:16:11 -0700</bug_when>
    <thetext>Hey,

(In reply to comment #3)
&gt; I&apos;ll refresh the patch to be applyable and move it to webkitprivate.h (there
&gt; seems to be some other API which is under discussion too), but just to allow
&gt; people to easily import it if they need the functionality, not for inclusion.
 
Have you been able to do this work yet? Still plan to do it? =)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>120361</commentid>
    <comment_count>7</comment_count>
    <who name="Jan Alonzo">jmalonzo</who>
    <bug_when>2009-05-07 17:05:56 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; Hey,
&gt; 
&gt; (In reply to comment #3)
&gt; &gt; I&apos;ll refresh the patch to be applyable and move it to webkitprivate.h (there
&gt; &gt; seems to be some other API which is under discussion too), but just to allow
&gt; &gt; people to easily import it if they need the functionality, not for inclusion.
&gt; 
&gt; Have you been able to do this work yet? Still plan to do it? =)

Setting database paths are currently supported in WebCore settings so it might be a good idea to make this a setting (which also make this a per-WebView thing in the API). Apps who want a specific location can just set it to the location they want - and we can just default it to what it is now.

I can cook up a patch if nobody&apos;s working on this right now..


</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>120371</commentid>
    <comment_count>8</comment_count>
    <who name="Jan Alonzo">jmalonzo</who>
    <bug_when>2009-05-07 17:51:55 -0700</bug_when>
    <thetext>(In reply to comment #7)
&gt; (In reply to comment #6)
&gt; Setting database paths are currently supported in WebCore settings so it might
&gt; be a good idea to make this a setting (which also make this a per-WebView thing
&gt; in the API). Apps who want a specific location can just set it to the location
&gt; they want - and we can just default it to what it is now.

Correction: setting database paths in Settings is only for localStorage. 
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>145122</commentid>
    <comment_count>9</comment_count>
    <who name="Jan Alonzo">jmalonzo</who>
    <bug_when>2009-09-07 03:25:59 -0700</bug_when>
    <thetext>You should be able to set the database storage path now that bug #27899 has been fixed.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>16863</attachid>
            <date>2007-10-25 12:31:21 -0700</date>
            <delta_ts>2007-10-25 12:31:21 -0700</delta_ts>
            <desc>A proposal of a possible api</desc>
            <filename>database-path.diff</filename>
            <type>text/plain</type>
            <size>1700</size>
            <attacher name="Christian Dywan">christian</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYktpdC9ndGsvQXBpL3dlYmtpdGd0a2dsb2JhbC5jcHAKPT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0g
V2ViS2l0L2d0ay9BcGkvd2Via2l0Z3RrZ2xvYmFsLmNwcAkoUmV2aXNpb24gMjcwNTIpCisrKyBX
ZWJLaXQvZ3RrL0FwaS93ZWJraXRndGtnbG9iYWwuY3BwCShBcmJlaXRza29waWUpCkBAIC0zNSw2
ICszNSwyNCBAQAogI2luY2x1ZGUgPGdsaWIuaD4KIAogZXh0ZXJuICJDIiB7CitnYm9vbGVhbi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