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

Unified Diff: net/url_request/url_request.cc

Issue 2579933002: Add logging for ResourceScheduler events. (Closed)
Patch Set: Created 4 years 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.cc
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
index 75eb4220106fe424eb49df9492143b2558913953..83bcf4e17b1b9dddacc7228e2b6060ab3a508ad4 100644
--- a/net/url_request/url_request.cc
+++ b/net/url_request/url_request.cc
@@ -584,7 +584,9 @@ URLRequest::URLRequest(const GURL& url,
DCHECK(base::ThreadTaskRunnerHandle::IsSet());
context->url_requests()->insert(this);
- net_log_.BeginEvent(NetLogEventType::REQUEST_ALIVE);
+ net_log_.BeginEvent(
+ NetLogEventType::REQUEST_ALIVE,
+ base::Bind(&NetLogURLRequestConstructorCallback, &url, priority_));
}
void URLRequest::BeforeRequestComplete(int error) {
@@ -627,7 +629,6 @@ void URLRequest::StartJob(URLRequestJob* job) {
net_log_.BeginEvent(
NetLogEventType::URL_REQUEST_START_JOB,
base::Bind(&NetLogURLRequestStartCallback, &url(), &method_, load_flags_,
- priority_,
upload_data_stream_ ? upload_data_stream_->identifier() : -1));
job_.reset(job);
@@ -1024,12 +1025,11 @@ void URLRequest::SetPriority(RequestPriority priority) {
return;
priority_ = priority;
- if (job_.get()) {
- net_log_.AddEvent(
- NetLogEventType::URL_REQUEST_SET_PRIORITY,
- NetLog::StringCallback("priority", RequestPriorityToString(priority_)));
+ net_log_.AddEvent(
+ NetLogEventType::URL_REQUEST_SET_PRIORITY,
+ NetLog::StringCallback("priority", RequestPriorityToString(priority_)));
+ if (job_.get())
job_->SetPriority(priority_);
- }
}
void URLRequest::NotifyAuthRequired(AuthChallengeInfo* auth_info) {

Powered by Google App Engine
This is Rietveld 408576698