| Index: net/http/http_auth_cache.h
|
| diff --git a/net/http/http_auth_cache.h b/net/http/http_auth_cache.h
|
| index 707288cfc0964309dbad3421a8d480c3e900392d..b6c382c8979eba2486f7027d4206b93eef5285c4 100644
|
| --- a/net/http/http_auth_cache.h
|
| +++ b/net/http/http_auth_cache.h
|
| @@ -28,6 +28,13 @@ class HttpAuthCache {
|
| public:
|
| class Entry;
|
|
|
| + // Prevent unbounded memory growth. These are safeguards for abuse; it is
|
| + // not expected that the limits will be reached in ordinary usage.
|
| + // This also defines the worst-case lookup times (which grow linearly
|
| + // with number of elements in the cache).
|
| + enum { kMaxNumPathsPerRealmEntry = 10 };
|
| + enum { kMaxNumRealmEntries = 10 };
|
| +
|
| HttpAuthCache();
|
| ~HttpAuthCache();
|
|
|
| @@ -93,13 +100,6 @@ class HttpAuthCache {
|
| const std::string& scheme,
|
| const std::string& auth_challenge);
|
|
|
| - // Prevent unbounded memory growth. These are safeguards for abuse; it is
|
| - // not expected that the limits will be reached in ordinary usage.
|
| - // This also defines the worst-case lookup times (which grow linearly
|
| - // with number of elements in the cache).
|
| - enum { kMaxNumPathsPerRealmEntry = 10 };
|
| - enum { kMaxNumRealmEntries = 10 };
|
| -
|
| private:
|
| typedef std::list<Entry> EntryList;
|
| EntryList entries_;
|
| @@ -108,6 +108,8 @@ class HttpAuthCache {
|
| // An authentication realm entry.
|
| class HttpAuthCache::Entry {
|
| public:
|
| + ~Entry();
|
| +
|
| const GURL& origin() const {
|
| return origin_;
|
| }
|
| @@ -143,13 +145,13 @@ class HttpAuthCache::Entry {
|
|
|
| void UpdateStaleChallenge(const std::string& auth_challenge);
|
|
|
| - ~Entry();
|
| -
|
| private:
|
| friend class HttpAuthCache;
|
| FRIEND_TEST_ALL_PREFIXES(HttpAuthCacheTest, AddPath);
|
| FRIEND_TEST_ALL_PREFIXES(HttpAuthCacheTest, AddToExistingEntry);
|
|
|
| + typedef std::list<std::string> PathList;
|
| +
|
| Entry();
|
|
|
| // Adds a path defining the realm's protection space. If the path is
|
| @@ -172,7 +174,6 @@ class HttpAuthCache::Entry {
|
| int nonce_count_;
|
|
|
| // List of paths that define the realm's protection space.
|
| - typedef std::list<std::string> PathList;
|
| PathList paths_;
|
| };
|
|
|
|
|