Chromium Code Reviews
DescriptionVector-of-structs (instead of struct-of-vectors) in "savable resources" IPC.
It is cleaner to send a vector-of-structs rather than a struct-of-vectors
(i.e. no need to verify the size of the vectors is the same, iteration
is easier as it doesn't require an index to look into both vectors).
This CL changes how "subframes" are sent in
FrameHostMsg_SavableResourceLinksResponse. They used to be sent as 2
vectors (of URLs and of routing_ids) and now they are sent as a single
vector (of a struct that contains URLs and routing_ids).
The same struct (content::SavableSubframe) is reused to return results
out of GetSavableResourceLinksForFrame in savable_resources.cc. The
decision to reuse the same struct necessitates
1) sharing/reusing GetRoutingIdForFrameOrProxy across
render_frame_impl.cc and savable_resources.cc and (so
GetRoutingIdForFrameOrProxy has been moved to web_frame_utils
compilation unit)
2) introducing a content::SavableSubframe struct that can be shared
via A) IPC handlers in browser and renderer and B) by savable_resources.cc
(and addressing B seemed better with an explicit struct with a short
name, rather than introducing an implicit struct via IPC_STRUCT_BEGIN).
Note that this CL keeps using a struct-of-vectors for reporting savable
resources (URL + referrer). This will be addressed in a separate CL
(crrev.com/1425013004).
BUG=526786
Committed: https://crrev.com/779a08f834625617d79a14be44871bbc84ab2574
Cr-Commit-Position: refs/heads/master@{#357852}
Patch Set 1 #
Total comments: 8
Patch Set 2 : Fixing SavableResourcesTest. #Patch Set 3 : Added missing includes to web_frame_utils.cc #Patch Set 4 : Rebasing... #
Messages
Total messages: 13 (4 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||