Chromium Code Reviews| 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 152 | 152 |
| 153 response_info_ = transaction_->GetResponseInfo(); | 153 response_info_ = transaction_->GetResponseInfo(); |
| 154 | 154 |
| 155 // Save boolean, as we'll need this info at destruction time, and filters may | 155 // Save boolean, as we'll need this info at destruction time, and filters may |
| 156 // also need this info. | 156 // also need this info. |
| 157 is_cached_content_ = response_info_->was_cached; | 157 is_cached_content_ = response_info_->was_cached; |
| 158 | 158 |
| 159 if (!is_cached_content_) { | 159 if (!is_cached_content_) { |
| 160 URLRequestThrottlerHeaderAdapter response_adapter( | 160 URLRequestThrottlerHeaderAdapter response_adapter( |
| 161 response_info_->headers); | 161 response_info_->headers); |
| 162 throttling_entry_->UpdateWithResponse(&response_adapter); | 162 throttling_entry_->UpdateWithResponse(request_info_.url.host(), |
|
yzshen1
2011/03/18 22:49:51
A throttling entry is used for a specific URL (and
Jói
2011/03/23 23:38:24
Storing the host would increase the required stora
yzshen1
2011/03/24 20:06:37
Okay.
On 2011/03/23 23:38:24, Jói wrote:
| |
| 163 &response_adapter); | |
| 163 } | 164 } |
| 164 | 165 |
| 165 ProcessStrictTransportSecurityHeader(); | 166 ProcessStrictTransportSecurityHeader(); |
| 166 | 167 |
| 167 if (SdchManager::Global() && | 168 if (SdchManager::Global() && |
| 168 SdchManager::Global()->IsInSupportedDomain(request_->url())) { | 169 SdchManager::Global()->IsInSupportedDomain(request_->url())) { |
| 169 static const std::string name = "Get-Dictionary"; | 170 static const std::string name = "Get-Dictionary"; |
| 170 std::string url_text; | 171 std::string url_text; |
| 171 void* iter = NULL; | 172 void* iter = NULL; |
| 172 // TODO(jar): We need to not fetch dictionaries the first time they are | 173 // TODO(jar): We need to not fetch dictionaries the first time they are |
| (...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 993 void URLRequestHttpJob::ResetTimer() { | 994 void URLRequestHttpJob::ResetTimer() { |
| 994 if (!request_creation_time_.is_null()) { | 995 if (!request_creation_time_.is_null()) { |
| 995 NOTREACHED() | 996 NOTREACHED() |
| 996 << "The timer was reset before it was recorded."; | 997 << "The timer was reset before it was recorded."; |
| 997 return; | 998 return; |
| 998 } | 999 } |
| 999 request_creation_time_ = base::Time::Now(); | 1000 request_creation_time_ = base::Time::Now(); |
| 1000 } | 1001 } |
| 1001 | 1002 |
| 1002 } // namespace net | 1003 } // namespace net |
| OLD | NEW |