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/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/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
930 // TODO(mbelshe): The keepalive property is really a property of | 930 // TODO(mbelshe): The keepalive property is really a property of |
931 // the stream. No need to compute it here just to pass back | 931 // the stream. No need to compute it here just to pass back |
932 // to the stream's Close function. | 932 // to the stream's Close function. |
933 if (stream_->CanFindEndOfResponse()) | 933 if (stream_->CanFindEndOfResponse()) |
934 keep_alive = GetResponseHeaders()->IsKeepAlive(); | 934 keep_alive = GetResponseHeaders()->IsKeepAlive(); |
935 } | 935 } |
936 | 936 |
937 // Clean up connection if we are done. | 937 // Clean up connection if we are done. |
938 if (done) { | 938 if (done) { |
939 LogTransactionMetrics(); | 939 LogTransactionMetrics(); |
| 940 stream_->LogNumRttVsBytesMetrics(); |
940 stream_->Close(!keep_alive); | 941 stream_->Close(!keep_alive); |
941 // Note: we don't reset the stream here. We've closed it, but we still | 942 // Note: we don't reset the stream here. We've closed it, but we still |
942 // need it around so that callers can call methods such as | 943 // need it around so that callers can call methods such as |
943 // GetUploadProgress() and have them be meaningful. | 944 // GetUploadProgress() and have them be meaningful. |
944 // TODO(mbelshe): This means we closed the stream here, and we close it | 945 // TODO(mbelshe): This means we closed the stream here, and we close it |
945 // again in ~HttpNetworkTransaction. Clean that up. | 946 // again in ~HttpNetworkTransaction. Clean that up. |
946 | 947 |
947 // The next Read call will return 0 (EOF). | 948 // The next Read call will return 0 (EOF). |
948 } | 949 } |
949 | 950 |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1341 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, | 1342 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, |
1342 state); | 1343 state); |
1343 break; | 1344 break; |
1344 } | 1345 } |
1345 return description; | 1346 return description; |
1346 } | 1347 } |
1347 | 1348 |
1348 #undef STATE_CASE | 1349 #undef STATE_CASE |
1349 | 1350 |
1350 } // namespace net | 1351 } // namespace net |
OLD | NEW |