diff options
author | zeno.albisser@digia.com <zeno.albisser@digia.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-28 21:25:52 +0000 |
---|---|---|
committer | zeno.albisser@digia.com <zeno.albisser@digia.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-28 21:25:52 +0000 |
commit | bdd8ea32582e53483a0d818ee100e7c7d0e36d35 (patch) | |
tree | 885b10f7cb21a9f1877374d159f7f7b240cc0195 /net/http/http_auth_cache.h | |
parent | 0fa0008be3c472ca3e7d89aed53f3056cbbf223a (diff) | |
download | chromium_src-bdd8ea32582e53483a0d818ee100e7c7d0e36d35.zip chromium_src-bdd8ea32582e53483a0d818ee100e7c7d0e36d35.tar.gz chromium_src-bdd8ea32582e53483a0d818ee100e7c7d0e36d35.tar.bz2 |
Template arguments to templates in std must have complete types.
Removing several forward declarations to ensure complete
types when instantiating a template in std.
clang++ on mac complains about this issue if building with libc++.
BUG=267500
R=thakis@chromium.org
Review URL: https://chromiumcodereview.appspot.com/22633003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220094 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_auth_cache.h')
-rw-r--r-- | net/http/http_auth_cache.h | 144 |
1 files changed, 71 insertions, 73 deletions
diff --git a/net/http/http_auth_cache.h b/net/http/http_auth_cache.h index 1d6f2d2..75b379f 100644 --- a/net/http/http_auth_cache.h +++ b/net/http/http_auth_cache.h @@ -26,7 +26,77 @@ namespace net { // Entries can be looked up by either (origin, realm, scheme) or (origin, path). class NET_EXPORT_PRIVATE HttpAuthCache { public: - class Entry; + class NET_EXPORT_PRIVATE Entry { + public: + ~Entry(); + + const GURL& origin() const { + return origin_; + } + + // The case-sensitive realm string of the challenge. + const std::string realm() const { + return realm_; + } + + // The authentication scheme of the challenge. + HttpAuth::Scheme scheme() const { + return scheme_; + } + + // The authentication challenge. + const std::string auth_challenge() const { + return auth_challenge_; + } + + // The login credentials. + const AuthCredentials& credentials() const { + return credentials_; + } + + int IncrementNonceCount() { + return ++nonce_count_; + } + + void UpdateStaleChallenge(const std::string& auth_challenge); + + 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 + // already contained in the protection space, is a no-op. + void AddPath(const std::string& path); + + // Returns true if |dir| is contained within the realm's protection + // space. |*path_len| is set to the length of the enclosing path if + // such a path exists and |path_len| is non-NULL. If no enclosing + // path is found, |*path_len| is left unmodified. + // + // Note that proxy auth cache entries are associated with empty + // paths. Therefore it is possible for HasEnclosingPath() to return + // true and set |*path_len| to 0. + bool HasEnclosingPath(const std::string& dir, size_t* path_len); + + // |origin_| contains the {protocol, host, port} of the server. + GURL origin_; + std::string realm_; + HttpAuth::Scheme scheme_; + + // Identity. + std::string auth_challenge_; + AuthCredentials credentials_; + + int nonce_count_; + + // List of paths that define the realm's protection space. + PathList paths_; + }; // Prevent unbounded memory growth. These are safeguards for abuse; it is // not expected that the limits will be reached in ordinary usage. @@ -106,78 +176,6 @@ class NET_EXPORT_PRIVATE HttpAuthCache { }; // An authentication realm entry. -class NET_EXPORT_PRIVATE HttpAuthCache::Entry { - public: - ~Entry(); - - const GURL& origin() const { - return origin_; - } - - // The case-sensitive realm string of the challenge. - const std::string realm() const { - return realm_; - } - - // The authentication scheme of the challenge. - HttpAuth::Scheme scheme() const { - return scheme_; - } - - // The authentication challenge. - const std::string auth_challenge() const { - return auth_challenge_; - } - - // The login credentials. - const AuthCredentials& credentials() const { - return credentials_; - } - - int IncrementNonceCount() { - return ++nonce_count_; - } - - void UpdateStaleChallenge(const std::string& auth_challenge); - - 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 - // already contained in the protection space, is a no-op. - void AddPath(const std::string& path); - - // Returns true if |dir| is contained within the realm's protection - // space. |*path_len| is set to the length of the enclosing path if - // such a path exists and |path_len| is non-NULL. If no enclosing - // path is found, |*path_len| is left unmodified. - // - // Note that proxy auth cache entries are associated with empty - // paths. Therefore it is possible for HasEnclosingPath() to return - // true and set |*path_len| to 0. - bool HasEnclosingPath(const std::string& dir, size_t* path_len); - - // |origin_| contains the {protocol, host, port} of the server. - GURL origin_; - std::string realm_; - HttpAuth::Scheme scheme_; - - // Identity. - std::string auth_challenge_; - AuthCredentials credentials_; - - int nonce_count_; - - // List of paths that define the realm's protection space. - PathList paths_; -}; - } // namespace net #endif // NET_HTTP_HTTP_AUTH_CACHE_H_ |