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

Unified Diff: net/url_request/url_request.cc

Issue 2579933002: Add logging for ResourceScheduler events. (Closed)
Patch Set: DCHECK to make sure that all async starts have defined triggers. Created 3 years, 12 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/log/net_log_event_type_list.h ('k') | net/url_request/url_request_netlog_params.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..f687beccf6a5d20fc95222aab1c22e6ed06a83fb 100644
--- a/net/url_request/url_request.cc
+++ b/net/url_request/url_request.cc
@@ -294,7 +294,7 @@ std::unique_ptr<base::Value> URLRequest::GetStateAsValue() const {
if (!load_state.param.empty())
dict->SetString("load_state_param", load_state.param);
if (!blocked_by_.empty())
- dict->SetString("delegate_info", blocked_by_);
+ dict->SetString("delegate_blocked_by", blocked_by_);
dict->SetString("method", method_);
dict->SetBoolean("has_upload", has_upload());
@@ -335,8 +335,9 @@ void URLRequest::LogBlockedBy(const char* blocked_by) {
blocked_by_ = blocked_by;
use_blocked_by_as_load_param_ = false;
- net_log_.BeginEvent(NetLogEventType::DELEGATE_INFO,
- NetLog::StringCallback("delegate_info", &blocked_by_));
+ net_log_.BeginEvent(
+ NetLogEventType::DELEGATE_INFO,
+ NetLog::StringCallback("delegate_blocked_by", &blocked_by_));
}
void URLRequest::LogAndReportBlockedBy(const char* source) {
@@ -584,7 +585,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 +630,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 +1026,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) {
« no previous file with comments | « net/log/net_log_event_type_list.h ('k') | net/url_request/url_request_netlog_params.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698