<?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>147288</bug_id>
          
          <creation_ts>2015-07-24 19:46:01 -0700</creation_ts>
          <short_desc>[GTK] Enable persistent cookie storage in MiniBrowser.</short_desc>
          <delta_ts>2017-03-11 11:05:48 -0800</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>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Hyungwook Lee">hyungwook.lee</reporter>
          <assigned_to name="Hyungwook Lee">hyungwook.lee</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1112180</commentid>
    <comment_count>0</comment_count>
    <who name="Hyungwook Lee">hyungwook.lee</who>
    <bug_when>2015-07-24 19:46:01 -0700</bug_when>
    <thetext>I think it will be good if we support persistent cookie storage in MiniBrowser.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1112182</commentid>
    <comment_count>1</comment_count>
      <attachid>257507</attachid>
    <who name="Hyungwook Lee">hyungwook.lee</who>
    <bug_when>2015-07-24 19:58:42 -0700</bug_when>
    <thetext>Created attachment 257507
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1153354</commentid>
    <comment_count>2</comment_count>
      <attachid>257507</attachid>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-01-06 20:49:11 -0800</bug_when>
    <thetext>Comment on attachment 257507
Patch

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

Hi Hyungwook, why do you want this? It seems useful to me that when MiniBrowser is restarted, there are no cookies that could be affecting the results of whatever it is I&apos;m testing. Maybe it&apos;s not likely to often cause problems in practice, though, so I&apos;m not opposed to this change.

&gt; Tools/MiniBrowser/gtk/main.c:298
&gt; +    // Enable persistent cookie storage.

Please remove this comment, it&apos;s a &quot;what&quot; comment and doesn&apos;t add any value. We prefer comments that explain &quot;why.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1154617</commentid>
    <comment_count>3</comment_count>
    <who name="Hyungwook Lee">hyungwook.lee</who>
    <bug_when>2016-01-11 21:22:37 -0800</bug_when>
    <thetext>I think persistent cookie function is default function of most browser support it.

To prevent confusion of using cookie, we&apos;d better to meet another browser&apos;s behavior even if it is mini-browser.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1154626</commentid>
    <comment_count>4</comment_count>
      <attachid>268747</attachid>
    <who name="Hyungwook Lee">hyungwook.lee</who>
    <bug_when>2016-01-11 21:45:28 -0800</bug_when>
    <thetext>Created attachment 268747
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1154700</commentid>
    <comment_count>5</comment_count>
      <attachid>268747</attachid>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2016-01-12 08:43:57 -0800</bug_when>
    <thetext>Comment on attachment 268747
Patch

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

MiniBrowser is not a general purpose browser, it&apos;s for testing, so I&apos;m not sure we want to save cookies. I agree it could be useful for testing cookies, though. So, maybe we could add a command line option to pass the cookies storage path, or the other way around, always save cookies and add a command line option to not use persistent cookies.

&gt; Tools/MiniBrowser/gtk/main.c:299
&gt; +    webkit_cookie_manager_set_persistent_storage(cookieManager, g_build_filename(g_get_user_data_dir(), &quot;webkitgtk&quot;, &quot;cookies.db&quot;, NULL), WEBKIT_COOKIE_PERSISTENT_STORAGE_SQLITE);

This is leaking the value returned by g_build_filename(), it returns a new allocated string that should be freed. Also, I don&apos;t think we should use a generic webkitgtk dir, but someting more specific like MiniBrowser.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>257507</attachid>
            <date>2015-07-24 19:58:42 -0700</date>
            <delta_ts>2016-01-11 21:38:57 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-147288-20150725115724.patch</filename>
            <type>text/plain</type>
            <size>1360</size>
            <attacher name="Hyungwook Lee">hyungwook.lee</attacher>
            
              <data encoding="base64">SW5kZXg6IFRvb2xzL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBUb29scy9DaGFuZ2VMb2cJKHJl
dmlzaW9uIDE4NzM3NykKKysrIFRvb2xzL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwz
ICsxLDEzIEBACisyMDE1LTA3LTI0ICBIeXVuZ3dvb2sgTGVlICA8aHl1bmd3b29rLmxlZUBuYXZl
cmNvcnAuY29tPgorCisgICAgICAgIFtHVEtdIEVuYWJsZSBwZXJzaXN0ZW50IGNvb2tpZSBzdG9y
YWdlIGluIE1pbmlCcm93c2VyLgorICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93
X2J1Zy5jZ2k/aWQ9MTQ3Mjg4CisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISku
CisKKyAgICAgICAgKiBNaW5pQnJvd3Nlci9ndGsvbWFpbi5jOgorICAgICAgICAobWFpbik6CisK
IDIwMTUtMDctMjQgIENocmlzIEZsZWl6YWNoICA8Y2ZsZWl6YWNoQGFwc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k7CisKICAgICBpZiAodXJpQXJndW1lbnRzKSB7CiAgICAgICAgIGludCBpOwogCg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>268747</attachid>
            <date>2016-01-11 21:45:28 -0800</date>
            <delta_ts>2016-01-12 08:43:57 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>Patch</filename>
            <type>text/plain</type>
            <size>1317</size>
            <attacher name="Hyungwook Lee">hyungwook.lee</attacher>
            
              <data encoding="base64">SW5kZXg6IFRvb2xzL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBUb29scy9DaGFuZ2VMb2cJKHJl
dmlzaW9uIDE5NDg4NSkKKysrIFRvb2xzL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwz
ICsxLDEzIEBACisyMDE2LTAxLTExICBIeXVuZ3dvb2sgTGVlICA8aHl1bmd3b29rLmxlZUBuYXZl
cmNvcnAuY29tPgorCisgICAgICAgIFtHVEtdIEVuYWJsZSBwZXJzaXN0ZW50IGNvb2tpZSBzdG9y
YWdlIGluIE1pbmlCcm93c2VyLgorICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93
X2J1Zy5jZ2k/aWQ9MTQ3Mjg4CisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISku
CisKKyAgICAgICAgKiBNaW5pQnJvd3Nlci9ndGsvbWFpbi5jOgorICAgICAgICAobWFpbik6CisK
IDIwMTYtMDEtMTEgIFNhYW0gYmFyYXRpICA8c2JhcmF0aUBhcHBsZS5jb20+CiAKICAgICAgICAg
cnVuLWpzYy1zdHJlc3MtdGVzdHMgc2hvdWxkIHRyeSB0byBmaWd1cmUgb3V0IGEgSlNDIHBhdGgK
SW5kZXg6IFRvb2xzL01pbmlCcm93c2VyL2d0ay9tYWluLmMKPT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gVG9vbHMv
TWluaUJyb3dzZXIvZ3RrL21haW4uYwkocmV2aXNpb24gMTk0ODg1KQorKysgVG9vbHMvTWluaUJy
b3dzZXIvZ3RrL21haW4uYwkod29ya2luZyBjb3B5KQpAQCAtMjk1LDYgKzI5NSw5IEBAIGludCBt
YWluKGludCBhcmdjLCBjaGFyICphcmd2W10pCiAKICAgICB3ZWJraXRfd2ViX2NvbnRleHRfcmVn
aXN0ZXJfdXJpX3NjaGVtZSh3ZWJraXRfd2ViX2NvbnRleHRfZ2V0X2RlZmF1bHQoKSwgbWluaUJy
b3dzZXJBYm91dFNjaGVtZSwgYWJvdXRVUklTY2hlbWVSZXF1ZXN0Q2FsbGJhY2ssIE5VTEwsIE5V
TEwpOwogCisgICAgV2ViS2l0Q29va2llTWFuYWdlciAqY29va2llTWFuYWdlciA9IHdlYmtpdF93
ZWJfY29udGV4dF9nZXRfY29va2llX21hbmFnZXIod2Via2l0X3dlYl9jb250ZXh0X2dldF9kZWZh
dWx0KCkpOworICAgIHdlYmtpdF9jb29raWVfbWFuYWdlcl9zZXRfcGVyc2lzdGVudF9zdG9yYWdl
KGNvb2tpZU1hbmFnZXIsIGdfYnVpbGRfZmlsZW5hbWUoZ19nZXRfdXNlcl9kYXRhX2RpcigpLCAi
d2Via2l0Z3RrIiwgImNvb2tpZXMuZGIiLCBOVUxMKSwgV0VCS0lUX0NPT0tJRV9QRVJTSVNURU5U
X1NUT1JBR0VfU1FMSVRFKTsKKwogICAgIGlmICh1cmlBcmd1bWVudHMpIHsKICAgICAgICAgaW50
IGk7CiAK
</data>
<flag name="review"
          id="293733"
          type_id="1"
          status="-"
          setter="cgarcia"
    />
          </attachment>
      

    </bug>

</bugzilla>