Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: net/http/http_network_transaction.cc

Issue 7189055: Deciding best connection to schedule requests on based on cwnd and idle time (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Reuploading because net/socket/socket_test_util.cc is bad Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/http/http_basic_stream.cc ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 922 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 // TODO(mbelshe): The keepalive property is really a property of 933 // TODO(mbelshe): The keepalive property is really a property of
934 // the stream. No need to compute it here just to pass back 934 // the stream. No need to compute it here just to pass back
935 // to the stream's Close function. 935 // to the stream's Close function.
936 if (stream_->CanFindEndOfResponse()) 936 if (stream_->CanFindEndOfResponse())
937 keep_alive = GetResponseHeaders()->IsKeepAlive(); 937 keep_alive = GetResponseHeaders()->IsKeepAlive();
938 } 938 }
939 939
940 // Clean up connection if we are done. 940 // Clean up connection if we are done.
941 if (done) { 941 if (done) {
942 LogTransactionMetrics(); 942 LogTransactionMetrics();
943 stream_->LogNumRttVsBytesMetrics();
943 stream_->Close(!keep_alive); 944 stream_->Close(!keep_alive);
944 // Note: we don't reset the stream here. We've closed it, but we still 945 // Note: we don't reset the stream here. We've closed it, but we still
945 // need it around so that callers can call methods such as 946 // need it around so that callers can call methods such as
946 // GetUploadProgress() and have them be meaningful. 947 // GetUploadProgress() and have them be meaningful.
947 // TODO(mbelshe): This means we closed the stream here, and we close it 948 // TODO(mbelshe): This means we closed the stream here, and we close it
948 // again in ~HttpNetworkTransaction. Clean that up. 949 // again in ~HttpNetworkTransaction. Clean that up.
949 950
950 // The next Read call will return 0 (EOF). 951 // The next Read call will return 0 (EOF).
951 } 952 }
952 953
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
1344 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, 1345 description = base::StringPrintf("Unknown state 0x%08X (%u)", state,
1345 state); 1346 state);
1346 break; 1347 break;
1347 } 1348 }
1348 return description; 1349 return description;
1349 } 1350 }
1350 1351
1351 #undef STATE_CASE 1352 #undef STATE_CASE
1352 1353
1353 } // namespace net 1354 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_basic_stream.cc ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698