Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/http/http_network_transaction.h" | 5 #include "net/http/http_network_transaction.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 156 } else if (stream_->IsSpdyHttpStream()) { | 156 } else if (stream_->IsSpdyHttpStream()) { |
| 157 // Doesn't really matter for SpdyHttpStream. Just close it. | 157 // Doesn't really matter for SpdyHttpStream. Just close it. |
| 158 stream_->Close(true /* not reusable */); | 158 stream_->Close(true /* not reusable */); |
| 159 } else { | 159 } else { |
| 160 // Otherwise, we try to drain the response body. | 160 // Otherwise, we try to drain the response body. |
| 161 HttpStreamBase* stream = stream_.release(); | 161 HttpStreamBase* stream = stream_.release(); |
| 162 stream->Drain(session_.get()); | 162 stream->Drain(session_.get()); |
| 163 } | 163 } |
| 164 } | 164 } |
| 165 } | 165 } |
| 166 | |
| 167 if (request_ && request_->upload_data_stream) | |
| 168 request_->upload_data_stream->Reset(); // Invalidate pending operations. | |
|
mmenke
2013/10/02 01:02:54
Comment isn't accurate - pending operations will s
hashimoto
2013/10/02 03:45:35
Done.
| |
| 166 } | 169 } |
| 167 | 170 |
| 168 int HttpNetworkTransaction::Start(const HttpRequestInfo* request_info, | 171 int HttpNetworkTransaction::Start(const HttpRequestInfo* request_info, |
| 169 const CompletionCallback& callback, | 172 const CompletionCallback& callback, |
| 170 const BoundNetLog& net_log) { | 173 const BoundNetLog& net_log) { |
| 171 SIMPLE_STATS_COUNTER("HttpNetworkTransaction.Count"); | 174 SIMPLE_STATS_COUNTER("HttpNetworkTransaction.Count"); |
| 172 | 175 |
| 173 net_log_ = net_log; | 176 net_log_ = net_log; |
| 174 request_ = request_info; | 177 request_ = request_info; |
| 175 start_time_ = base::Time::Now(); | 178 start_time_ = base::Time::Now(); |
| (...skipping 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1479 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, | 1482 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, |
| 1480 state); | 1483 state); |
| 1481 break; | 1484 break; |
| 1482 } | 1485 } |
| 1483 return description; | 1486 return description; |
| 1484 } | 1487 } |
| 1485 | 1488 |
| 1486 #undef STATE_CASE | 1489 #undef STATE_CASE |
| 1487 | 1490 |
| 1488 } // namespace net | 1491 } // namespace net |
| OLD | NEW |