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/bind.h" | 7 #include "base/bind.h" |
8 #include "base/base_switches.h" | 8 #include "base/base_switches.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1196 } | 1196 } |
1197 | 1197 |
1198 return false; | 1198 return false; |
1199 } | 1199 } |
1200 | 1200 |
1201 void URLRequestHttpJob::StopCaching() { | 1201 void URLRequestHttpJob::StopCaching() { |
1202 if (transaction_.get()) | 1202 if (transaction_.get()) |
1203 transaction_->StopCaching(); | 1203 transaction_->StopCaching(); |
1204 } | 1204 } |
1205 | 1205 |
| 1206 void URLRequestHttpJob::DoneReading() { |
| 1207 if (transaction_.get()) |
| 1208 transaction_->DoneReading(); |
| 1209 DoneWithRequest(FINISHED); |
| 1210 } |
| 1211 |
1206 HostPortPair URLRequestHttpJob::GetSocketAddress() const { | 1212 HostPortPair URLRequestHttpJob::GetSocketAddress() const { |
1207 return response_info_ ? response_info_->socket_address : HostPortPair(); | 1213 return response_info_ ? response_info_->socket_address : HostPortPair(); |
1208 } | 1214 } |
1209 | 1215 |
1210 URLRequestHttpJob::~URLRequestHttpJob() { | 1216 URLRequestHttpJob::~URLRequestHttpJob() { |
1211 DCHECK(!sdch_test_control_ || !sdch_test_activated_); | 1217 DCHECK(!sdch_test_control_ || !sdch_test_activated_); |
1212 if (!is_cached_content_) { | 1218 if (!is_cached_content_) { |
1213 if (sdch_test_control_) | 1219 if (sdch_test_control_) |
1214 RecordPacketStats(FilterContext::SDCH_EXPERIMENT_HOLDBACK); | 1220 RecordPacketStats(FilterContext::SDCH_EXPERIMENT_HOLDBACK); |
1215 if (sdch_test_activated_) | 1221 if (sdch_test_activated_) |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1477 if (done_) | 1483 if (done_) |
1478 return; | 1484 return; |
1479 done_ = true; | 1485 done_ = true; |
1480 | 1486 |
1481 RecordPerfHistograms(reason); | 1487 RecordPerfHistograms(reason); |
1482 if (reason == FINISHED) | 1488 if (reason == FINISHED) |
1483 RecordCompressionHistograms(); | 1489 RecordCompressionHistograms(); |
1484 } | 1490 } |
1485 | 1491 |
1486 } // namespace net | 1492 } // namespace net |
OLD | NEW |