Bug 193607 - C strings in ClientCertificateAuthenticationXPCConstants.h are duplicated
Summary: C strings in ClientCertificateAuthenticationXPCConstants.h are duplicated
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-01-18 21:18 PST by David Kilzer (:ddkilzer)
Modified: 2019-01-22 12:52 PST (History)
6 users (show)

See Also:


Attachments
Patch v1 (8.86 KB, patch)
2019-01-18 21:35 PST, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff
Patch v2 (8.86 KB, patch)
2019-01-18 22:38 PST, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff
Patch v3 (14.89 KB, patch)
2019-01-19 09:17 PST, David Kilzer (:ddkilzer)
achristensen: review+
Details | Formatted Diff | Diff
Patch v4 (for landing) (14.82 KB, patch)
2019-01-21 12:32 PST, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>