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

Unified Diff: net/url_request/url_request_http_job.cc

Issue 10532121: NetLogEventParameter to Callback refactoring 6. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Update includes Created 8 years, 6 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
Index: net/url_request/url_request_http_job.cc
===================================================================
--- net/url_request/url_request_http_job.cc (revision 141814)
+++ net/url_request/url_request_http_job.cc (working copy)
@@ -278,8 +278,9 @@
if (result == OK) {
StartTransactionInternal();
} else {
+ std::string source("delegate");
eroman 2012/06/13 18:48:11 (Same comment as earlier applies here).
request_->net_log().AddEvent(NetLog::TYPE_CANCELLED,
- make_scoped_refptr(new NetLogStringParameter("source", "delegate")));
+ NetLog::StringCallback("source", &source));
NotifyCanceled();
}
}
@@ -475,8 +476,9 @@
void URLRequestHttpJob::SaveCookiesAndNotifyHeadersComplete(int result) {
if (result != net::OK) {
+ std::string source("delegate");
eroman 2012/06/13 18:48:11 Ditto.
request_->net_log().AddEvent(NetLog::TYPE_CANCELLED,
- make_scoped_refptr(new NetLogStringParameter("source", "delegate")));
+ NetLog::StringCallback("source", &source));
NotifyStartError(URLRequestStatus(URLRequestStatus::FAILED, result));
return;
}
@@ -678,11 +680,12 @@
if (error == net::ERR_IO_PENDING) {
awaiting_callback_ = true;
request_->net_log().BeginEvent(
- NetLog::TYPE_URL_REQUEST_BLOCKED_ON_DELEGATE, NULL);
+ NetLog::TYPE_URL_REQUEST_BLOCKED_ON_DELEGATE);
} else {
+ std::string source("delegate");
eroman 2012/06/13 18:48:11 ditto.
request_->net_log().AddEvent(NetLog::TYPE_CANCELLED,
- make_scoped_refptr(
- new NetLogStringParameter("source", "delegate")));
+ NetLog::StringCallback("source",
+ &source));
NotifyStartError(URLRequestStatus(URLRequestStatus::FAILED, error));
}
return;
@@ -712,8 +715,7 @@
}
void URLRequestHttpJob::OnHeadersReceivedCallback(int result) {
- request_->net_log().EndEvent(
- NetLog::TYPE_URL_REQUEST_BLOCKED_ON_DELEGATE, NULL);
+ request_->net_log().EndEvent(NetLog::TYPE_URL_REQUEST_BLOCKED_ON_DELEGATE);
awaiting_callback_ = false;
// Check that there are no callbacks to already canceled requests.

Powered by Google App Engine
This is Rietveld 408576698