Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1008)

Unified Diff: net/url_request/url_request.cc

Issue 1746012: More cleanup of net_log.h (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/spdy/spdy_stream.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request.cc
===================================================================
--- net/url_request/url_request.cc (revision 45828)
+++ net/url_request/url_request.cc (working copy)
@@ -259,8 +259,10 @@
DCHECK(!is_pending_);
DCHECK(!job_);
- net_log_.BeginEventWithString(net::NetLog::TYPE_URL_REQUEST_START,
- "url", original_url().possibly_invalid_spec());
+ net_log_.BeginEvent(
+ net::NetLog::TYPE_URL_REQUEST_START,
+ new net::NetLogStringParameter(
+ "url", original_url().possibly_invalid_spec()));
job_ = job;
job_->SetExtraRequestHeaders(extra_request_headers_);
@@ -367,10 +369,11 @@
void URLRequest::ResponseStarted() {
if (!status_.is_success()) {
- net_log_.EndEventWithInteger(net::NetLog::TYPE_URL_REQUEST_START,
- "net_error", status_.os_error());
+ net_log_.EndEvent(
+ net::NetLog::TYPE_URL_REQUEST_START,
+ new net::NetLogIntegerParameter("net_error", status_.os_error()));
} else {
- net_log_.EndEvent(net::NetLog::TYPE_URL_REQUEST_START);
+ net_log_.EndEvent(net::NetLog::TYPE_URL_REQUEST_START, NULL);
}
URLRequestJob* job = GetJobManager()->MaybeInterceptResponse(this);
@@ -445,8 +448,10 @@
int URLRequest::Redirect(const GURL& location, int http_status_code) {
if (net_log_.HasListener()) {
- net_log_.AddEventWithString(net::NetLog::TYPE_URL_REQUEST_REDIRECTED,
- "location", location.possibly_invalid_spec());
+ net_log_.AddEvent(
+ net::NetLog::TYPE_URL_REQUEST_REDIRECTED,
+ new net::NetLogStringParameter(
+ "location", location.possibly_invalid_spec()));
}
if (redirect_limit_ <= 0) {
DLOG(INFO) << "disallowing redirect: exceeds limit";
@@ -512,13 +517,13 @@
// If the context this request belongs to has changed, update the tracker.
if (prev_context != context) {
- net_log_.EndEvent(net::NetLog::TYPE_REQUEST_ALIVE);
+ net_log_.EndEvent(net::NetLog::TYPE_REQUEST_ALIVE, NULL);
net_log_ = net::BoundNetLog();
if (context) {
net_log_ = net::BoundNetLog::Make(context->net_log(),
net::NetLog::SOURCE_URL_REQUEST);
- net_log_.BeginEvent(net::NetLog::TYPE_REQUEST_ALIVE);
+ net_log_.BeginEvent(net::NetLog::TYPE_REQUEST_ALIVE, NULL);
}
}
}
« no previous file with comments | « net/spdy/spdy_stream.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698