diff options
author | cbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-13 13:31:17 +0000 |
---|---|---|
committer | cbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-13 13:31:17 +0000 |
commit | 547fc79ddbed132ba12797c4f0e0aeecd3b63b8f (patch) | |
tree | 618e14cd18540b93815df91ffd01bd245d3691b4 /net/http/http_auth.h | |
parent | 1597bafcf13b29051d16debae1d561b385550572 (diff) | |
download | chromium_src-547fc79ddbed132ba12797c4f0e0aeecd3b63b8f.zip chromium_src-547fc79ddbed132ba12797c4f0e0aeecd3b63b8f.tar.gz chromium_src-547fc79ddbed132ba12797c4f0e0aeecd3b63b8f.tar.bz2 |
Cleanup: Use AUTH_SCHEME enum instead of a string.
BUG=None
TEST=trybots
Review URL: http://codereview.chromium.org/6191001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71318 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_auth.h')
-rw-r--r-- | net/http/http_auth.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/net/http/http_auth.h b/net/http/http_auth.h index 0034b1f..ef779a1 100644 --- a/net/http/http_auth.h +++ b/net/http/http_auth.h @@ -80,6 +80,15 @@ class HttpAuth { IDENT_SRC_DEFAULT_CREDENTIALS, }; + enum Scheme { + AUTH_SCHEME_BASIC = 0, + AUTH_SCHEME_DIGEST, + AUTH_SCHEME_NTLM, + AUTH_SCHEME_NEGOTIATE, + AUTH_SCHEME_MOCK, + AUTH_SCHEME_MAX, + }; + // Helper structure used by HttpNetworkTransaction to track // the current identity being used for authorization. struct Identity { @@ -103,6 +112,9 @@ class HttpAuth { // messages. static std::string GetAuthTargetString(Target target); + // Returns a string representation of an authentication Scheme. + static const char* SchemeToString(Scheme scheme); + // Iterate through the challenge headers, and pick the best one that // we support. Obtains the implementation class for handling the challenge, // and passes it back in |*handler|. If no supported challenge was found, @@ -117,7 +129,7 @@ class HttpAuth { const HttpResponseHeaders* headers, Target target, const GURL& origin, - const std::set<std::string>& disabled_schemes, + const std::set<Scheme>& disabled_schemes, const BoundNetLog& net_log, scoped_ptr<HttpAuthHandler>* handler); @@ -146,7 +158,7 @@ class HttpAuth { HttpAuthHandler* handler, const HttpResponseHeaders* headers, Target target, - const std::set<std::string>& disabled_schemes, + const std::set<Scheme>& disabled_schemes, std::string* challenge_used); // Breaks up a challenge string into the the auth scheme and parameter list, |