The renderer has a custom HTTPHeaderMap object that wraps a HashMap that uses a case-folding hash to achieve case insensitive behaviour.
The browser uses a regular std::map with a case insensitive comparator to achieve the same.
The struct traits for the FetchAPIRequest Mojo object copy the data into a regular map so that the Mojo bindings can move the data to the receiver end, where we copy it once more to store it in the std::map<>. It'd be good to eliminate these copies.
Since both the HTTPHeaderMap and the std::map<> expose standard iterators to a <K,V> pair, maybe we can feed the Mojo bindings code {begin(), end()} iterators as opposed to the actual map for such code?
Comment 1 by yhirano@chromium.org
, Mar 29 2017