Bug 124554 - Upstream iOS's ResourceHandle implementation
Summary: Upstream iOS's ResourceHandle implementation
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Benjamin Poulain
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-18 18:15 PST by Benjamin Poulain
Modified: 2013-11-18 23:17 PST (History)
4 users (show)

See Also:


Attachments
Patch (23.25 KB, patch)
2013-11-18 18:16 PST, Benjamin Poulain
no flags Details | Formatted Diff | Diff
Patch (23.49 KB, patch)
2013-11-18 19:07 PST, Benjamin Poulain
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Poulain 2013-11-18 18:15:58 PST
Upstream iOS's ResourceHandle implementation
Comment 1 Benjamin Poulain 2013-11-18 18:16:32 PST
Created attachment 217260 [details]
Patch
Comment 2 WebKit Commit Bot 2013-11-18 18:18:27 PST
Attachment 217260 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/platform/network/ResourceHandle.h', u'Source/WebCore/platform/network/ResourceHandleClient.h', u'Source/WebCore/platform/network/ResourceHandleInternal.h', u'Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp']" exit_code: 1
Source/WebCore/platform/network/ResourceHandle.h:38:  CFURLConnectionClient_V6 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 1 in 5 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Build Bot 2013-11-18 18:57:57 PST
Comment on attachment 217260 [details]
Patch

Attachment 217260 [details] did not pass win-ews (win):
Output: http://webkit-queues.appspot.com/results/28618041
Comment 4 Benjamin Poulain 2013-11-18 19:07:47 PST
Created attachment 217264 [details]
Patch
Comment 5 WebKit Commit Bot 2013-11-18 19:09:02 PST
Attachment 217264 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/platform/network/ResourceHandle.h', u'Source/WebCore/platform/network/ResourceHandleClient.h', u'Source/WebCore/platform/network/ResourceHandleInternal.h', u'Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp']" exit_code: 1
Source/WebCore/platform/network/ResourceHandle.h:75:  CFURLConnectionClient_V6 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 1 in 5 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Benjamin Poulain 2013-11-18 19:52:50 PST
I did some basic cleaning to reduce the numbers of #ifdefs.

I'll add the asynchronous implementation on top of this.
Comment 7 Benjamin Poulain 2013-11-18 20:52:43 PST
Comment on attachment 217264 [details]
Patch

Clearing flags on attachment: 217264

Committed r159479: <http://trac.webkit.org/changeset/159479>
Comment 8 Benjamin Poulain 2013-11-18 20:52:45 PST
All reviewed patches have been landed.  Closing bug.
Comment 9 Alexey Proskuryakov 2013-11-18 23:17:02 PST
Comment on attachment 217264 [details]
Patch

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

Looks good!

QuickLook integration at ResourceHandle level is a surprising place to see it.

> Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp:394
> +#if PLATFORM(IOS)
> +    ProtectionSpace coreProtectionSpace = core(protectionSpace);
> +    if (coreProtectionSpace.authenticationScheme() == ProtectionSpaceAuthenticationSchemeUnknown)
> +        return false;
> +    return handle->canAuthenticateAgainstProtectionSpace(coreProtectionSpace);
> +#else
>      return handle->canAuthenticateAgainstProtectionSpace(core(protectionSpace));
> +#endif

This looks like it could be cross-platform maybe. Did you blame the iOS side to see what this fix was for?

> Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp:881
> +CFURLConnectionClient_V6* ResourceHandle::connectionClientCallbacks()

The result of this function is copied anyway, why not return a const object pointer?