Bug 193607

Summary: C strings in ClientCertificateAuthenticationXPCConstants.h are duplicated
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: WebKit2Assignee: David Kilzer (:ddkilzer) <ddkilzer>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, ddkilzer, koivisto, simon.fraser, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch v1
none
Patch v2
none
Patch v3
achristensen: review+
Patch v4 (for landing) none

Description David Kilzer (:ddkilzer) 2019-01-18 21:18:40 PST
C strings in ClientCertificateAuthenticationXPCConstants.h are duplicated in each source file that includes this header:

$ egrep -l -r 'ClientCertificateAuthenticationXPCConstants.h[">]' Source/WebKit 
Source/WebKit/UIProcess/Authentication/cocoa/AuthenticationChallengeProxyCocoa.mm
Source/WebKit/Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm

We should move the string constants to their own source file so they aren't duplicated.
Comment 1 David Kilzer (:ddkilzer) 2019-01-18 21:18:52 PST
<rdar://problem/47334613>
Comment 2 David Kilzer (:ddkilzer) 2019-01-18 21:35:14 PST
Created attachment 359585 [details]
Patch v1
Comment 3 David Kilzer (:ddkilzer) 2019-01-18 22:38:29 PST
Created attachment 359588 [details]
Patch v2
Comment 4 David Kilzer (:ddkilzer) 2019-01-19 09:17:08 PST
Created attachment 359612 [details]
Patch v3
Comment 5 Alex Christensen 2019-01-21 08:55:49 PST
Comment on attachment 359612 [details]
Patch v3

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

> Source/WebKit/Shared/Authentication/cocoa/ClientCertificateAuthenticationXPCConstants.h:32
> +struct ClientCertificateAuthentication {

Isn't this more of a namespace?
Comment 6 David Kilzer (:ddkilzer) 2019-01-21 09:56:49 PST
Comment on attachment 359612 [details]
Patch v3

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

>> Source/WebKit/Shared/Authentication/cocoa/ClientCertificateAuthenticationXPCConstants.h:32
>> +struct ClientCertificateAuthentication {
> 
> Isn't this more of a namespace?

Sure, a namespace could be used instead.  Would you prefer that?
Comment 7 David Kilzer (:ddkilzer) 2019-01-21 12:32:16 PST
Created attachment 359706 [details]
Patch v4 (for landing)
Comment 8 David Kilzer (:ddkilzer) 2019-01-21 12:32:39 PST
Comment on attachment 359706 [details]
Patch v4 (for landing)

Now with namespace.
Comment 9 David Kilzer (:ddkilzer) 2019-01-22 12:50:13 PST
Committed r240275: <https://trac.webkit.org/changeset/240275>