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

Side by Side Diff: net/url_request/url_request.cc

Issue 2905007: Add the URLRequest's priority to the net-log.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: address cbentzel comments Created 10 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 20010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/url_request/url_request.h" 5 #include "net/url_request/url_request.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/singleton.h" 9 #include "base/singleton.h"
10 #include "base/stats_counters.h" 10 #include "base/stats_counters.h"
11 #include "net/base/load_flags.h" 11 #include "net/base/load_flags.h"
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 } 261 }
262 262
263 /////////////////////////////////////////////////////////////////////////////// 263 ///////////////////////////////////////////////////////////////////////////////
264 264
265 void URLRequest::StartJob(URLRequestJob* job) { 265 void URLRequest::StartJob(URLRequestJob* job) {
266 DCHECK(!is_pending_); 266 DCHECK(!is_pending_);
267 DCHECK(!job_); 267 DCHECK(!job_);
268 268
269 net_log_.BeginEvent( 269 net_log_.BeginEvent(
270 net::NetLog::TYPE_URL_REQUEST_START_JOB, 270 net::NetLog::TYPE_URL_REQUEST_START_JOB,
271 new URLRequestStartEventParameters(url_, method_, load_flags_)); 271 new URLRequestStartEventParameters(
272 url_, method_, load_flags_, priority_));
272 273
273 job_ = job; 274 job_ = job;
274 job_->SetExtraRequestHeaders(extra_request_headers_); 275 job_->SetExtraRequestHeaders(extra_request_headers_);
275 276
276 if (upload_.get()) 277 if (upload_.get())
277 job_->SetUpload(upload_.get()); 278 job_->SetUpload(upload_.get());
278 279
279 is_pending_ = true; 280 is_pending_ = true;
280 281
281 response_info_.request_time = Time::Now(); 282 response_info_.request_time = Time::Now();
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 URLRequest::UserData* URLRequest::GetUserData(const void* key) const { 532 URLRequest::UserData* URLRequest::GetUserData(const void* key) const {
532 UserDataMap::const_iterator found = user_data_.find(key); 533 UserDataMap::const_iterator found = user_data_.find(key);
533 if (found != user_data_.end()) 534 if (found != user_data_.end())
534 return found->second.get(); 535 return found->second.get();
535 return NULL; 536 return NULL;
536 } 537 }
537 538
538 void URLRequest::SetUserData(const void* key, UserData* data) { 539 void URLRequest::SetUserData(const void* key, UserData* data) {
539 user_data_[key] = linked_ptr<UserData>(data); 540 user_data_[key] = linked_ptr<UserData>(data);
540 } 541 }
OLDNEW
« no previous file with comments | « chrome/browser/net/passive_log_collector_unittest.cc ('k') | net/url_request/url_request_netlog_params.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698