Add _WKDownloadDelegate callback including totalBytesWritten
Created attachment 399778 [details] Patch
<rdar://problem/63358981>
Created attachment 399779 [details] Patch
Created attachment 399780 [details] Patch
Created attachment 399781 [details] Patch
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 on attachment 399781 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=399781&action=review r=me > Tools/TestWebKitAPI/cocoa/TestDownloadDelegate.mm:49 > +- (void)_download:(_WKDownload *)download didWriteData:(uint64_t)bytesWritten totalBytesWritten:(uint64_t)totalBytesWritten totalBytesExpectedToWrite:(uint64_t)totalBytesExpectedToWrite I wonder if we can keep the didReceive naming pattern, to match the rest of the API and other networking APIs. didReceiveBytes:(uint64_t)bytes totalBytes:(uint64_t)totalBytes totalBytesExpected:(uint64_t)totalBytesExpected
Comment on attachment 399781 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=399781&action=review >> Tools/TestWebKitAPI/cocoa/TestDownloadDelegate.mm:49 >> +- (void)_download:(_WKDownload *)download didWriteData:(uint64_t)bytesWritten totalBytesWritten:(uint64_t)totalBytesWritten totalBytesExpectedToWrite:(uint64_t)totalBytesExpectedToWrite > > I wonder if we can keep the didReceive naming pattern, to match the rest of the API and other networking APIs. > > didReceiveBytes:(uint64_t)bytes totalBytes:(uint64_t)totalBytes totalBytesExpected:(uint64_t)totalBytesExpected Downloads are not like other networking APIs. This callback is not called until the data is written to disk, just like the CFNetwork callback. There is a time between when the bytes are received and when they are written, and this should not be called during that time.
It was a mistake to use the name didWriteData before and this fixes that mistake.
Committed r261898: <https://trac.webkit.org/changeset/261898> All reviewed patches have been landed. Closing bug and clearing flags on attachment 399781 [details].