| 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 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 689 rv = transaction_->RestartWithAuth(username_, password_, &start_callback_); | 689 rv = transaction_->RestartWithAuth(username_, password_, &start_callback_); |
| 690 username_.clear(); | 690 username_.clear(); |
| 691 password_.clear(); | 691 password_.clear(); |
| 692 } else { | 692 } else { |
| 693 DCHECK(request_->context()); | 693 DCHECK(request_->context()); |
| 694 DCHECK(request_->context()->http_transaction_factory()); | 694 DCHECK(request_->context()->http_transaction_factory()); |
| 695 | 695 |
| 696 rv = request_->context()->http_transaction_factory()->CreateTransaction( | 696 rv = request_->context()->http_transaction_factory()->CreateTransaction( |
| 697 &transaction_); | 697 &transaction_); |
| 698 if (rv == OK) { | 698 if (rv == OK) { |
| 699 if (!throttling_entry_->IsDuringExponentialBackoff()) { | 699 if (!throttling_entry_->IsDuringExponentialBackoff() || |
| 700 !net::URLRequestThrottlerManager::GetInstance()-> |
| 701 enforce_throttling()) { |
| 700 rv = transaction_->Start( | 702 rv = transaction_->Start( |
| 701 &request_info_, &start_callback_, request_->net_log()); | 703 &request_info_, &start_callback_, request_->net_log()); |
| 702 } else { | 704 } else { |
| 703 // Special error code for the exponential back-off module. | 705 // Special error code for the exponential back-off module. |
| 704 rv = ERR_TEMPORARILY_THROTTLED; | 706 rv = ERR_TEMPORARILY_THROTTLED; |
| 705 } | 707 } |
| 706 // Make sure the context is alive for the duration of the | 708 // Make sure the context is alive for the duration of the |
| 707 // transaction. | 709 // transaction. |
| 708 context_ = request_->context(); | 710 context_ = request_->context(); |
| 709 } | 711 } |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 958 include_subdomains, | 960 include_subdomains, |
| 959 ctx->transport_security_state()); | 961 ctx->transport_security_state()); |
| 960 if (!prober->ProbeHost(request_info_.url.host(), request()->context(), | 962 if (!prober->ProbeHost(request_info_.url.host(), request()->context(), |
| 961 delegate)) { | 963 delegate)) { |
| 962 delete delegate; | 964 delete delegate; |
| 963 } | 965 } |
| 964 } | 966 } |
| 965 } | 967 } |
| 966 | 968 |
| 967 } // namespace net | 969 } // namespace net |
| OLD | NEW |