| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 DCHECK(!transaction_.get()); | 646 DCHECK(!transaction_.get()); |
| 647 | 647 |
| 648 // Ensure that we do not send username and password fields in the referrer. | 648 // Ensure that we do not send username and password fields in the referrer. |
| 649 GURL referrer(request_->GetSanitizedReferrer()); | 649 GURL referrer(request_->GetSanitizedReferrer()); |
| 650 | 650 |
| 651 request_info_.url = request_->url(); | 651 request_info_.url = request_->url(); |
| 652 request_info_.referrer = referrer; | 652 request_info_.referrer = referrer; |
| 653 request_info_.method = request_->method(); | 653 request_info_.method = request_->method(); |
| 654 request_info_.load_flags = request_->load_flags(); | 654 request_info_.load_flags = request_->load_flags(); |
| 655 request_info_.priority = request_->priority(); | 655 request_info_.priority = request_->priority(); |
| 656 request_info_.request_id = request_->identifier(); |
| 656 | 657 |
| 657 if (request_->context()) { | 658 if (request_->context()) { |
| 658 request_info_.extra_headers.SetHeaderIfMissing( | 659 request_info_.extra_headers.SetHeaderIfMissing( |
| 659 HttpRequestHeaders::kUserAgent, | 660 HttpRequestHeaders::kUserAgent, |
| 660 request_->context()->GetUserAgent(request_->url())); | 661 request_->context()->GetUserAgent(request_->url())); |
| 661 } | 662 } |
| 662 | 663 |
| 663 AddExtraHeaders(); | 664 AddExtraHeaders(); |
| 664 AddCookieHeaderAndStart(); | 665 AddCookieHeaderAndStart(); |
| 665 } | 666 } |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 987 void URLRequestHttpJob::ResetTimer() { | 988 void URLRequestHttpJob::ResetTimer() { |
| 988 if (!request_creation_time_.is_null()) { | 989 if (!request_creation_time_.is_null()) { |
| 989 NOTREACHED() | 990 NOTREACHED() |
| 990 << "The timer was reset before it was recorded."; | 991 << "The timer was reset before it was recorded."; |
| 991 return; | 992 return; |
| 992 } | 993 } |
| 993 request_creation_time_ = base::Time::Now(); | 994 request_creation_time_ = base::Time::Now(); |
| 994 } | 995 } |
| 995 | 996 |
| 996 } // namespace net | 997 } // namespace net |
| OLD | NEW |