| 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 | 203 |
| 204 response_info_ = transaction_->GetResponseInfo(); | 204 response_info_ = transaction_->GetResponseInfo(); |
| 205 | 205 |
| 206 // Save boolean, as we'll need this info at destruction time, and filters may | 206 // Save boolean, as we'll need this info at destruction time, and filters may |
| 207 // also need this info. | 207 // also need this info. |
| 208 is_cached_content_ = response_info_->was_cached; | 208 is_cached_content_ = response_info_->was_cached; |
| 209 | 209 |
| 210 if (!is_cached_content_) { | 210 if (!is_cached_content_) { |
| 211 URLRequestThrottlerHeaderAdapter response_adapter( | 211 URLRequestThrottlerHeaderAdapter response_adapter( |
| 212 response_info_->headers); | 212 response_info_->headers); |
| 213 throttling_entry_->UpdateWithResponse(&response_adapter); | 213 throttling_entry_->UpdateWithResponse(request_info_.url.host(), |
| 214 &response_adapter); |
| 214 } | 215 } |
| 215 | 216 |
| 216 ProcessStrictTransportSecurityHeader(); | 217 ProcessStrictTransportSecurityHeader(); |
| 217 | 218 |
| 218 if (SdchManager::Global() && | 219 if (SdchManager::Global() && |
| 219 SdchManager::Global()->IsInSupportedDomain(request_->url())) { | 220 SdchManager::Global()->IsInSupportedDomain(request_->url())) { |
| 220 static const std::string name = "Get-Dictionary"; | 221 static const std::string name = "Get-Dictionary"; |
| 221 std::string url_text; | 222 std::string url_text; |
| 222 void* iter = NULL; | 223 void* iter = NULL; |
| 223 // TODO(jar): We need to not fetch dictionaries the first time they are | 224 // TODO(jar): We need to not fetch dictionaries the first time they are |
| (...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1072 void URLRequestHttpJob::ResetTimer() { | 1073 void URLRequestHttpJob::ResetTimer() { |
| 1073 if (!request_creation_time_.is_null()) { | 1074 if (!request_creation_time_.is_null()) { |
| 1074 NOTREACHED() | 1075 NOTREACHED() |
| 1075 << "The timer was reset before it was recorded."; | 1076 << "The timer was reset before it was recorded."; |
| 1076 return; | 1077 return; |
| 1077 } | 1078 } |
| 1078 request_creation_time_ = base::Time::Now(); | 1079 request_creation_time_ = base::Time::Now(); |
| 1079 } | 1080 } |
| 1080 | 1081 |
| 1081 } // namespace net | 1082 } // namespace net |
| OLD | NEW |