OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |