summaryrefslogtreecommitdiffstats
path: root/net/http/http_auth_handler.h
diff options
context:
space:
mode:
authorcbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-13 18:20:06 +0000
committercbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-13 18:20:06 +0000
commit65f3777483e77c1b2bd7de89ebf11ce9ba55c98d (patch)
tree9c5d052ebd85f592d9a3458f8e1e0daa084775fd /net/http/http_auth_handler.h
parentb9fc810b6adcc42e4d72cac03482c515696e2d96 (diff)
downloadchromium_src-65f3777483e77c1b2bd7de89ebf11ce9ba55c98d.zip
chromium_src-65f3777483e77c1b2bd7de89ebf11ce9ba55c98d.tar.gz
chromium_src-65f3777483e77c1b2bd7de89ebf11ce9ba55c98d.tar.bz2
Histogram target for each HTTP Authentication Scheme.
For each HTTP authentication scheme, record whether it was started for a proxy, a secure proxy, a server, or a secure server. Also, use a new scheme-based enumerated value as an index rather than the score. BUG=None TEST=trybots, look at about:histograms after authenticating to different resources. Review URL: http://codereview.chromium.org/5563006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69018 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_auth_handler.h')
-rw-r--r--net/http/http_auth_handler.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/net/http/http_auth_handler.h b/net/http/http_auth_handler.h
index f5ce1be..b48d4c2 100644
--- a/net/http/http_auth_handler.h
+++ b/net/http/http_auth_handler.h
@@ -27,6 +27,14 @@ struct HttpRequestInfo;
// HttpAuthHandler objects are typically created by an HttpAuthHandlerFactory.
class HttpAuthHandler {
public:
+ enum AuthScheme {
+ AUTH_SCHEME_BASIC = 0,
+ AUTH_SCHEME_DIGEST,
+ AUTH_SCHEME_NTLM,
+ AUTH_SCHEME_NEGOTIATE,
+ AUTH_SCHEME_MAX,
+ };
+
HttpAuthHandler();
virtual ~HttpAuthHandler();
@@ -80,6 +88,11 @@ class HttpAuthHandler {
CompletionCallback* callback,
std::string* auth_token);
+ // The authentication scheme as an enumerated value.
+ AuthScheme auth_scheme() const {
+ return auth_scheme_;
+ }
+
// Lowercase name of the auth scheme
const std::string& scheme() const {
return scheme_;
@@ -105,6 +118,13 @@ class HttpAuthHandler {
return target_;
}
+ // Returns the proxy or server which issued the authentication challenge
+ // that this HttpAuthHandler is handling. The URL includes scheme, host, and
+ // port, but does not include path.
+ const GURL& origin() const {
+ return origin_;
+ }
+
// Returns true if the authentication scheme does not send the username and
// password in the clear.
bool encrypts_identity() const {
@@ -155,6 +175,9 @@ class HttpAuthHandler {
CompletionCallback* callback,
std::string* auth_token) = 0;
+ // The auth-scheme as an enumerated value.
+ AuthScheme auth_scheme_;
+
// The lowercase auth-scheme {"basic", "digest", "ntlm", "negotiate"}
std::string scheme_;