summaryrefslogtreecommitdiffstats
path: root/net/url_request
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-27 23:20:45 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-27 23:20:45 +0000
commitd13f51bc832e8e7965e92f5aa4b16b8c10c3f913 (patch)
treed5a1a413bf8716befbae7d056cd8c6194eed5a98 /net/url_request
parentf2286c23e17c0012d53800a5ef28975b6e22393a (diff)
downloadchromium_src-d13f51bc832e8e7965e92f5aa4b16b8c10c3f913.zip
chromium_src-d13f51bc832e8e7965e92f5aa4b16b8c10c3f913.tar.gz
chromium_src-d13f51bc832e8e7965e92f5aa4b16b8c10c3f913.tar.bz2
Cleanup: Address some of the todos in net_log.h
- Get rid of the AddString() and AddStringLiteral() methods. - Make EventParameters able to serialize to JSON, instead of a string. BUG=37421 Review URL: http://codereview.chromium.org/1716007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45750 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request')
-rw-r--r--net/url_request/url_request.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
index 348fb37..589d81f 100644
--- a/net/url_request/url_request.cc
+++ b/net/url_request/url_request.cc
@@ -260,7 +260,7 @@ void URLRequest::StartJob(URLRequestJob* job) {
DCHECK(!job_);
net_log_.BeginEventWithString(net::NetLog::TYPE_URL_REQUEST_START,
- original_url().possibly_invalid_spec());
+ "url", original_url().possibly_invalid_spec());
job_ = job;
job_->SetExtraRequestHeaders(extra_request_headers_);
@@ -368,7 +368,7 @@ void URLRequest::ReceivedRedirect(const GURL& location, bool* defer_redirect) {
void URLRequest::ResponseStarted() {
if (!status_.is_success()) {
net_log_.EndEventWithInteger(net::NetLog::TYPE_URL_REQUEST_START,
- status_.os_error());
+ "net_error", status_.os_error());
} else {
net_log_.EndEvent(net::NetLog::TYPE_URL_REQUEST_START);
}
@@ -445,8 +445,8 @@ std::string URLRequest::StripPostSpecificHeaders(const std::string& headers) {
int URLRequest::Redirect(const GURL& location, int http_status_code) {
if (net_log_.HasListener()) {
- net_log_.AddString(StringPrintf("Redirected (%d) to %s",
- http_status_code, location.spec().c_str()));
+ net_log_.AddEventWithString(net::NetLog::TYPE_URL_REQUEST_REDIRECTED,
+ "location", location.possibly_invalid_spec());
}
if (redirect_limit_ <= 0) {
DLOG(INFO) << "disallowing redirect: exceeds limit";