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

Side by Side Diff: net/socket/client_socket_pool_base_unittest.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: syncing to head 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
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/socket/client_socket_pool_base.h" 5 #include "net/socket/client_socket_pool_base.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 } 81 }
82 82
83 virtual const BoundNetLog& NetLog() const { 83 virtual const BoundNetLog& NetLog() const {
84 return net_log_; 84 return net_log_;
85 } 85 }
86 86
87 virtual void SetSubresourceSpeculation() {} 87 virtual void SetSubresourceSpeculation() {}
88 virtual void SetOmniboxSpeculation() {} 88 virtual void SetOmniboxSpeculation() {}
89 virtual bool WasEverUsed() const { return was_used_to_convey_data_; } 89 virtual bool WasEverUsed() const { return was_used_to_convey_data_; }
90 virtual bool UsingTCPFastOpen() const { return false; } 90 virtual bool UsingTCPFastOpen() const { return false; }
91 virtual int64 NumBytesRead() const { return -1; }
92 virtual int GetConnectTimeMicros() const { return -1; }
91 93
92 private: 94 private:
93 bool connected_; 95 bool connected_;
94 BoundNetLog net_log_; 96 BoundNetLog net_log_;
95 bool was_used_to_convey_data_; 97 bool was_used_to_convey_data_;
96 98
97 DISALLOW_COPY_AND_ASSIGN(MockClientSocket); 99 DISALLOW_COPY_AND_ASSIGN(MockClientSocket);
98 }; 100 };
99 101
100 class TestConnectJob; 102 class TestConnectJob;
(...skipping 3080 matching lines...) Expand 10 before | Expand all | Expand 10 after
3181 // The hung connect job should still be there, but everything else should be 3183 // The hung connect job should still be there, but everything else should be
3182 // complete. 3184 // complete.
3183 EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a")); 3185 EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
3184 EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a")); 3186 EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
3185 EXPECT_EQ(1, pool_->NumActiveSocketsInGroup("a")); 3187 EXPECT_EQ(1, pool_->NumActiveSocketsInGroup("a"));
3186 } 3188 }
3187 3189
3188 } // namespace 3190 } // namespace
3189 3191
3190 } // namespace net 3192 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698