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

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

Issue 6698009: Add request_id to HttpRequestInfo and pass it to the NetworkDelegate for events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: delegate callbcak Created 9 years, 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_http_job.h" 5 #include "net/url_request/url_request_http_job.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 DCHECK(!transaction_.get()); 697 DCHECK(!transaction_.get());
698 698
699 // Ensure that we do not send username and password fields in the referrer. 699 // Ensure that we do not send username and password fields in the referrer.
700 GURL referrer(request_->GetSanitizedReferrer()); 700 GURL referrer(request_->GetSanitizedReferrer());
701 701
702 request_info_.url = request_->url(); 702 request_info_.url = request_->url();
703 request_info_.referrer = referrer; 703 request_info_.referrer = referrer;
704 request_info_.method = request_->method(); 704 request_info_.method = request_->method();
705 request_info_.load_flags = request_->load_flags(); 705 request_info_.load_flags = request_->load_flags();
706 request_info_.priority = request_->priority(); 706 request_info_.priority = request_->priority();
707 request_info_.request_id = request_->identifier();
707 708
708 if (request_->context()) { 709 if (request_->context()) {
709 request_info_.extra_headers.SetHeaderIfMissing( 710 request_info_.extra_headers.SetHeaderIfMissing(
710 HttpRequestHeaders::kUserAgent, 711 HttpRequestHeaders::kUserAgent,
711 request_->context()->GetUserAgent(request_->url())); 712 request_->context()->GetUserAgent(request_->url()));
712 } 713 }
713 714
714 AddExtraHeaders(); 715 AddExtraHeaders();
715 AddCookieHeaderAndStart(); 716 AddCookieHeaderAndStart();
716 } 717 }
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
1066 void URLRequestHttpJob::ResetTimer() { 1067 void URLRequestHttpJob::ResetTimer() {
1067 if (!request_creation_time_.is_null()) { 1068 if (!request_creation_time_.is_null()) {
1068 NOTREACHED() 1069 NOTREACHED()
1069 << "The timer was reset before it was recorded."; 1070 << "The timer was reset before it was recorded.";
1070 return; 1071 return;
1071 } 1072 }
1072 request_creation_time_ = base::Time::Now(); 1073 request_creation_time_ = base::Time::Now();
1073 } 1074 }
1074 1075
1075 } // namespace net 1076 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698