DescriptionDeduplicating code performing WebHTTPBody::Element conversions.
Before this CL, there were 2 separate structs in //content layer holding
essentially the same information about parts of http body:
ResourceRequestBody::Element and ExplodedHttpBodyElement.
To deal with 2 separate structs, recent CLs had to introduce duplicated,
copy & pasted code that performed conversions between WebHTTPBody::Element
from the Blink layer and the 2 structs in the //content layer.
Examples:
1. https://crrev.com/1956383003:
1.a. AddHTTPBodyToRequest in //content/renderer/render_frame_impl.cc
duplicated code from //content/renderer/history_serialization.cc
2. https://crrev.com/1907443006:
2.a. Almost exactly the same as above, AddHTTPBodyToRequest in
//content/renderer/render_frame_impl.cc duplicated code from
//content/renderer/history_serialization.cc
2.b. ResourceRequestBody::AppendExplodedHTTPBodyElement in
//content/common/resource_request_body.cc was duplicating
The current CL removes the duplicated code by making
ExplodedHttpBodyElement a type alias for ResourceRequestBody::Element
and removing code that dealt with the old ExplodedHttpBodyElement
struct.
BUG=582211
Committed: https://crrev.com/2d0c9ae694afcb5c16028222e206b64aaba0cdba
Cr-Commit-Position: refs/heads/master@{#395461}
Patch Set 1 #Patch Set 2 : Fixed building of unit tests + fixed conversion of type id values. #Patch Set 3 : Deduplicating conversion routines. #Patch Set 4 : Removing more things (from rebasing/including clamy@'s CL). #Patch Set 5 : Self-review. #Patch Set 6 : Rebasing on top of ToT... #
Total comments: 5
Patch Set 7 : s/data/test_body/g #
Messages
Total messages: 16 (8 generated)
|