• gavinp@chromium.org's avatar
    Add histogram for HTTP response codes · 82aed06f
    gavinp@chromium.org authored
    This adds an histogram to the HTTP response header parser.  I reviewed
    the code, and I've convinced myself that this captures the two main
    cases of HTTP header parsing (tunneling, and normal HTTP), and that
    double-calls aren't occuring.  I liked having all the code in the one
    translation unit.  But, I might have missed one, and we might still
    be getting called twice for the same load: so the statistics might be off.
    
    Alternatively, I could put a static function on HttpResponseHeader, to
    be called from the site of parse.  But this might miss a parse.
    
    All in all, I wanted to be sure to catch all distinct response codes
    we get, so we can be sure not to stomp on anything.  So I chose the
    approach using the HttpResponseHeaders constructor.
    
    TEST=none
    BUG=70428
    
    Review URL: http://codereview.chromium.org/6317011
    
    git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72801 0039d316-1c4b-4281-b951-d872f2087c98
    82aed06f
http_response_headers.cc 42.1 KB