Contrary to popular belief, for HTTP requests, this is not actually the expected size of the uncompressed content, but rather the size of the response body before decompression. The name here is confusing, and we should discourage anything from caring about the Content-Length of a response. It also returns -1 when unknown, which can also lead to unexpected behaviors.
I'd like us to remove the method. Consumers can still access the Content-Length header, but I think we can live with that. Note that removing this method is fairly involved - we have a number of consumers in the browser process, and pass it down to the renderer as well. Wherever we reasonably can, we should make consumers not care about the content length value, rather than just switching them to pulling it directly from the response.
Labeling this as a net-fixit bug. It's probably too much for a single fixit, but could work on decreasing the number of callsites, in preparation for removal.
Comment 1 by eroman@chromium.org
, Apr 21 2016