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

Unified Diff: net/url_request/url_request.cc

Issue 1556018: Add support for attaching custom parameters to NetLog events. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Address willchan's comments 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/socket_stream/socket_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 44049)
+++ net/url_request/url_request.cc (working copy)
@@ -259,7 +259,8 @@
DCHECK(!is_pending_);
DCHECK(!job_);
- net_log_.BeginEvent(net::NetLog::TYPE_URL_REQUEST_START);
+ net_log_.BeginEventWithString(net::NetLog::TYPE_URL_REQUEST_START,
+ original_url().possibly_invalid_spec());
job_ = job;
job_->SetExtraRequestHeaders(extra_request_headers_);
@@ -365,11 +366,13 @@
}
void URLRequest::ResponseStarted() {
- if (!status_.is_success())
- net_log_.AddErrorCode(status_.os_error());
+ if (!status_.is_success()) {
+ net_log_.EndEventWithInteger(net::NetLog::TYPE_URL_REQUEST_START,
+ status_.os_error());
+ } else {
+ net_log_.EndEvent(net::NetLog::TYPE_URL_REQUEST_START);
+ }
- net_log_.EndEvent(net::NetLog::TYPE_URL_REQUEST_START);
-
URLRequestJob* job = GetJobManager()->MaybeInterceptResponse(this);
if (job) {
RestartWithJob(job);
@@ -515,9 +518,7 @@
if (context) {
net_log_ = net::BoundNetLog::Make(context->net_log(),
net::NetLog::SOURCE_URL_REQUEST);
-
- net_log_.BeginEventWithString(net::NetLog::TYPE_REQUEST_ALIVE,
- original_url_.possibly_invalid_spec());
+ net_log_.BeginEvent(net::NetLog::TYPE_REQUEST_ALIVE);
}
}
}
« no previous file with comments | « net/socket_stream/socket_stream.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698