Chromium Code Reviews
DescriptionRelanding: Deduplicating 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, 614299
Committed: https://crrev.com/28b27bcc839a67e8a44a18536cd587fd0746ee40
Cr-Commit-Position: refs/heads/master@{#396043}
Patch Set 1 : Original CL (from https://crrev.com/1987053002) #Patch Set 2 : Fixing dbg-only crash when bytes() is called on empty storage::DataElement. #
Total comments: 4
Patch Set 3 : Rebasing... #
Dependent Patchsets: Messages
Total messages: 13 (6 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||