summaryrefslogtreecommitdiffstats
path: root/net/http
diff options
context:
space:
mode:
authorcbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-07 16:05:52 +0000
committercbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-07 16:05:52 +0000
commita4734198b8a2870e3343efceb46d05f470767e02 (patch)
treebdba574039f910041e79eb467804e74f7901b6aa /net/http
parentb0be612aea5fa64e03c883b85a5e69ed595aadaa (diff)
downloadchromium_src-a4734198b8a2870e3343efceb46d05f470767e02.zip
chromium_src-a4734198b8a2870e3343efceb46d05f470767e02.tar.gz
chromium_src-a4734198b8a2870e3343efceb46d05f470767e02.tar.bz2
Remove auth token generation timing histograms.
These didn't turn out to be terribly useful, and add some complexity to HttpAuthHandler. BUG=NONE TEST=targets build Review URL: http://codereview.chromium.org/6103003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70740 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http')
-rw-r--r--net/http/http_auth_handler.cc20
-rw-r--r--net/http/http_auth_handler.h9
2 files changed, 0 insertions, 29 deletions
diff --git a/net/http/http_auth_handler.cc b/net/http/http_auth_handler.cc
index 5c86d69..130123b 100644
--- a/net/http/http_auth_handler.cc
+++ b/net/http/http_auth_handler.cc
@@ -5,7 +5,6 @@
#include "net/http/http_auth_handler.h"
#include "base/logging.h"
-#include "base/metrics/histogram.h"
#include "base/string_util.h"
#include "base/stringprintf.h"
#include "net/base/net_errors.h"
@@ -26,12 +25,6 @@ HttpAuthHandler::HttpAuthHandler()
HttpAuthHandler::~HttpAuthHandler() {
}
-//static
-std::string HttpAuthHandler::GenerateHistogramNameFromScheme(
- const std::string& scheme) {
- return base::StringPrintf("Net.AuthGenerateToken_%s", scheme.c_str());
-}
-
bool HttpAuthHandler::InitFromChallenge(
HttpAuth::ChallengeTokenizer* challenge,
HttpAuth::Target target,
@@ -53,13 +46,6 @@ bool HttpAuthHandler::InitFromChallenge(
DCHECK(!ok || properties_ != -1);
DCHECK(!ok || auth_scheme_ != AUTH_SCHEME_MAX);
- if (ok)
- histogram_ = base::Histogram::FactoryTimeGet(
- GenerateHistogramNameFromScheme(scheme()),
- base::TimeDelta::FromMilliseconds(1),
- base::TimeDelta::FromSeconds(10), 50,
- base::Histogram::kUmaTargetedHistogramFlag);
-
return ok;
}
@@ -90,10 +76,8 @@ int HttpAuthHandler::GenerateAuthToken(const string16* username,
DCHECK(username != NULL || AllowsDefaultCredentials());
DCHECK(auth_token != NULL);
DCHECK(original_callback_ == NULL);
- DCHECK(histogram_.get());
original_callback_ = callback;
net_log_.BeginEvent(EventTypeFromAuthTarget(target_), NULL);
- generate_auth_token_start_ = base::TimeTicks::Now();
int rv = GenerateAuthTokenImpl(username, password, request,
&wrapper_callback_, auth_token);
if (rv != ERR_IO_PENDING)
@@ -118,10 +102,6 @@ void HttpAuthHandler::OnGenerateAuthTokenComplete(int rv) {
void HttpAuthHandler::FinishGenerateAuthToken() {
// TOOD(cbentzel): Should this be done in OK case only?
- DCHECK(histogram_.get());
- base::TimeDelta generate_auth_token_duration =
- base::TimeTicks::Now() - generate_auth_token_start_;
- histogram_->AddTime(generate_auth_token_duration);
net_log_.EndEvent(EventTypeFromAuthTarget(target_), NULL);
original_callback_ = NULL;
}
diff --git a/net/http/http_auth_handler.h b/net/http/http_auth_handler.h
index b48d4c2..65340df 100644
--- a/net/http/http_auth_handler.h
+++ b/net/http/http_auth_handler.h
@@ -9,15 +9,10 @@
#include <string>
#include "base/string16.h"
-#include "base/time.h"
#include "net/base/completion_callback.h"
#include "net/base/net_log.h"
#include "net/http/http_auth.h"
-namespace base {
-class Histogram;
-}
-
namespace net {
struct HttpRequestInfo;
@@ -206,13 +201,9 @@ class HttpAuthHandler {
private:
void OnGenerateAuthTokenComplete(int rv);
void FinishGenerateAuthToken();
- static std::string GenerateHistogramNameFromScheme(const std::string& scheme);
CompletionCallback* original_callback_;
CompletionCallbackImpl<HttpAuthHandler> wrapper_callback_;
- // When GenerateAuthToken was called.
- base::TimeTicks generate_auth_token_start_;
- scoped_refptr<base::Histogram> histogram_;
};
} // namespace net