<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [SOUP] Simplify custom protocols handler implementation"
   href="https://bugs.webkit.org/show_bug.cgi?id=164922#c17">Comment # 17</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [SOUP] Simplify custom protocols handler implementation"
   href="https://bugs.webkit.org/show_bug.cgi?id=164922">bug 164922</a>
              from <span class="vcard"><a class="email" href="mailto:darin&#64;apple.com" title="Darin Adler &lt;darin&#64;apple.com&gt;"> <span class="fn">Darin Adler</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=295159&amp;action=diff" name="attach_295159" title="Patch">attachment 295159</a> <a href="attachment.cgi?id=295159&amp;action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=295159&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=295159&amp;action=review</a>

There’s s surprising amount of SOUP-specific #if in all these classes. As a direction for WebKit2 seems like a step in the wrong direction; would be nice to find a more elegant way of doing it.

But I approve of landing it as is.

<span class="quote">&gt; Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:67
&gt; +#if USE(SOUP)
&gt; +    void didReceiveResponse(uint64_t customProtocolID, const WebCore::ResourceResponse&amp;);
&gt; +    void didLoadData(uint64_t customProtocolID, const IPC::DataReference&amp;);
&gt; +    void didFailWithError(uint64_t customProtocolID, const WebCore::ResourceError&amp;);
&gt; +    void didFinishLoading(uint64_t customProtocolID);
&gt; +#endif</span >

This doesn’t seem quite right to me; I don’t have strong objections to landing it, but it seems like the wrong direction long term. The people I would ask about alternatives are Sam and Anders.

<span class="quote">&gt; Source/WebKit2/UIProcess/WebProcessPool.h:140
&gt; +    void setCustomProtocolManagerClient(std::unique_ptr&lt;API::CustomProtocolManagerClient&gt;);</span >

A function like this should take unique_ptr&amp;&amp;, not just unique_ptr. See &lt;<a href="http://scottmeyers.blogspot.com/2014/07/should-move-only-types-ever-be-passed.html">http://scottmeyers.blogspot.com/2014/07/should-move-only-types-ever-be-passed.html</a>&gt; for one version of the rationale.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>