Bug 234455

Summary: Convert ProtectionSpace enums into enum classes
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebCore Misc.Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, berto, cgarcia, darin, ews-watchlist, galpeter, ggaren, gustavo, sam, toyoshim, webkit-bug-importer, youennf, yutak
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=234314
Attachments:
Description Flags
Patch
ews-feeder: commit-queue-
Patch
ews-feeder: commit-queue-
Patch
ews-feeder: commit-queue-
Patch none

Description Chris Dumez 2021-12-17 16:40:20 PST
Convert ProtectionSpace enums into enum classes.
Comment 1 Chris Dumez 2021-12-17 16:43:00 PST
Created attachment 447494 [details]
Patch
Comment 2 EWS Watchlist 2021-12-17 16:43:45 PST
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See https://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 3 Chris Dumez 2021-12-17 16:52:15 PST
Created attachment 447495 [details]
Patch
Comment 4 Chris Dumez 2021-12-17 18:25:46 PST
Created attachment 447499 [details]
Patch
Comment 5 Chris Dumez 2021-12-17 18:54:11 PST
Created attachment 447501 [details]
Patch
Comment 6 EWS 2021-12-18 09:47:31 PST
Committed r287224 (245387@main): <https://commits.webkit.org/245387@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 447501 [details].
Comment 7 Radar WebKit Bug Importer 2021-12-18 09:48:19 PST
<rdar://problem/86672863>
Comment 8 Darin Adler 2021-12-19 15:54:58 PST
Comment on attachment 447501 [details]
Patch

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

> Source/WebCore/platform/network/ProtectionSpaceBase.h:45
> +        HTTP = 1,
> +        HTTPS = 2,
> +        FTP = 3,
> +        FTPS = 4,
> +        ProxyHTTP = 5,
> +        ProxyHTTPS = 6,
> +        ProxyFTP = 7,
> +        ProxySOCKS = 8

Is there a reason we need to apply specific numbers here instead of letting the enumeration select consecutive numbers? Some reason to avoid 0?

> Source/WebCore/platform/network/ProtectionSpaceBase.h:61
> +        Default = 1,
> +        HTTPBasic = 2,
> +        HTTPDigest = 3,
> +        HTMLForm = 4,
> +        NTLM = 5,
> +        Negotiate = 6,
> +        ClientCertificateRequested = 7,
> +        ServerTrustEvaluationRequested = 8,
> +        OAuth = 9,
> +#if USE(GLIB)
> +        ClientCertificatePINRequested = 10,
> +#endif
> +        Unknown = 100

Same question.