Bug 51916 - Merge cf and mac header files with same name
Summary: Merge cf and mac header files with same name
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Pratik Solanki
URL:
Keywords:
Depends on:
Blocks: 51836
  Show dependency treegraph
 
Reported: 2011-01-04 23:16 PST by Pratik Solanki
Modified: 2011-01-05 13:56 PST (History)
1 user (show)

See Also:


Attachments
Patch (35.15 KB, patch)
2011-01-04 23:33 PST, Pratik Solanki
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pratik Solanki 2011-01-04 23:16:29 PST
We have header files with the same name and mostly identical code in mac and cf directories e.g.

WebCore/platform/network/cf/ResourceRequest.h
WebCore/platform/network/mac/ResourceRequest.h

We can merge the two and use #if USE(CFNETWORK) to separate out the code now that all the cf files have been added to the Xcode project in bug 51850.
Comment 1 Pratik Solanki 2011-01-04 23:33:46 PST
Created attachment 77975 [details]
Patch
Comment 2 Darin Adler 2011-01-05 08:09:45 PST
Comment on attachment 77975 [details]
Patch

It seems we could cut down the #ifs even further with some typedefs.
Comment 3 Pratik Solanki 2011-01-05 11:15:33 PST
(In reply to comment #2)
> (From update of attachment 77975 [details])
> It seems we could cut down the #ifs even further with some typedefs.

True. I tried it and it was easy to do for the ResourceError class, however for ResourceRequest and ResourceResponse we would also have to merge the member field names from m_nsURLRequest/m_cfURLRequest to m_urlRequest and refactor the code. That's turning out to be a much bigger patch. I'll do that separately from this one. Thanks for the review.
Comment 4 Pratik Solanki 2011-01-05 13:56:46 PST
Committed r75103: <http://trac.webkit.org/changeset/75103>