• Lily Chen's avatar
    Change HTTP Auth Cache from a list to a multimap · e099b1d1
    Lily Chen authored
    Previously, the HTTP Auth Cache was implemented as a list of auth
    entries, which was searched linearly for a matching entry upon lookup.
    This change converts the cache to a multimap keyed on the origin, which
    is expected to provide faster lookups in cases where there are no
    matching entries for a given origin (which is the majority of cases).
    This will also allow for a higher cache size limit without a linear
    increase in lookup time, hence the cache size limit is raised from 10 to
    20. This is expected to lower the rate of evictions upon adding entries.
    Obsolete histograms which no longer apply to the new implementation are
    also removed.
    
    Bug: 757116, 614108
    Change-Id: Iabd2104b2d1c38d474450978a712039819b038e6
    Reviewed-on: https://chromium-review.googlesource.com/c/1273820
    Commit-Queue: Lily Chen <chlily@chromium.org>
    Reviewed-by: default avatarAsanka Herath <asanka@chromium.org>
    Reviewed-by: default avatarSteven Holte <holte@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#599362}
    e099b1d1
http_auth_cache_unittest.cc 29.7 KB