Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Unified Diff: net/http/http_auth_cache.h

Issue 6085013: Start reordering the methods in headers in net/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_;
};

Powered by Google App Engine
This is Rietveld 408576698