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/socket/transport_client_socket_pool.h" | 5 #include "net/socket/transport_client_socket_pool.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/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 return OK; | 78 return OK; |
79 } | 79 } |
80 virtual const BoundNetLog& NetLog() const { | 80 virtual const BoundNetLog& NetLog() const { |
81 return net_log_; | 81 return net_log_; |
82 } | 82 } |
83 | 83 |
84 virtual void SetSubresourceSpeculation() {} | 84 virtual void SetSubresourceSpeculation() {} |
85 virtual void SetOmniboxSpeculation() {} | 85 virtual void SetOmniboxSpeculation() {} |
86 virtual bool WasEverUsed() const { return false; } | 86 virtual bool WasEverUsed() const { return false; } |
87 virtual bool UsingTCPFastOpen() const { return false; } | 87 virtual bool UsingTCPFastOpen() const { return false; } |
| 88 virtual int64 NumBytesRead() const { return -1; } |
| 89 virtual int GetConnectTimeMicros() const { return -1; } |
88 | 90 |
89 // Socket methods: | 91 // Socket methods: |
90 virtual int Read(IOBuffer* buf, int buf_len, | 92 virtual int Read(IOBuffer* buf, int buf_len, |
91 CompletionCallback* callback) { | 93 CompletionCallback* callback) { |
92 return ERR_FAILED; | 94 return ERR_FAILED; |
93 } | 95 } |
94 virtual int Write(IOBuffer* buf, int buf_len, | 96 virtual int Write(IOBuffer* buf, int buf_len, |
95 CompletionCallback* callback) { | 97 CompletionCallback* callback) { |
96 return ERR_FAILED; | 98 return ERR_FAILED; |
97 } | 99 } |
(...skipping 30 matching lines...) Expand all Loading... |
128 return ERR_UNEXPECTED; | 130 return ERR_UNEXPECTED; |
129 } | 131 } |
130 virtual const BoundNetLog& NetLog() const { | 132 virtual const BoundNetLog& NetLog() const { |
131 return net_log_; | 133 return net_log_; |
132 } | 134 } |
133 | 135 |
134 virtual void SetSubresourceSpeculation() {} | 136 virtual void SetSubresourceSpeculation() {} |
135 virtual void SetOmniboxSpeculation() {} | 137 virtual void SetOmniboxSpeculation() {} |
136 virtual bool WasEverUsed() const { return false; } | 138 virtual bool WasEverUsed() const { return false; } |
137 virtual bool UsingTCPFastOpen() const { return false; } | 139 virtual bool UsingTCPFastOpen() const { return false; } |
| 140 virtual int64 NumBytesRead() const { return -1; } |
| 141 virtual int GetConnectTimeMicros() const { return -1; } |
138 | 142 |
139 // Socket methods: | 143 // Socket methods: |
140 virtual int Read(IOBuffer* buf, int buf_len, | 144 virtual int Read(IOBuffer* buf, int buf_len, |
141 CompletionCallback* callback) { | 145 CompletionCallback* callback) { |
142 return ERR_FAILED; | 146 return ERR_FAILED; |
143 } | 147 } |
144 | 148 |
145 virtual int Write(IOBuffer* buf, int buf_len, | 149 virtual int Write(IOBuffer* buf, int buf_len, |
146 CompletionCallback* callback) { | 150 CompletionCallback* callback) { |
147 return ERR_FAILED; | 151 return ERR_FAILED; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 return OK; | 206 return OK; |
203 } | 207 } |
204 virtual const BoundNetLog& NetLog() const { | 208 virtual const BoundNetLog& NetLog() const { |
205 return net_log_; | 209 return net_log_; |
206 } | 210 } |
207 | 211 |
208 virtual void SetSubresourceSpeculation() {} | 212 virtual void SetSubresourceSpeculation() {} |
209 virtual void SetOmniboxSpeculation() {} | 213 virtual void SetOmniboxSpeculation() {} |
210 virtual bool WasEverUsed() const { return false; } | 214 virtual bool WasEverUsed() const { return false; } |
211 virtual bool UsingTCPFastOpen() const { return false; } | 215 virtual bool UsingTCPFastOpen() const { return false; } |
| 216 virtual int64 NumBytesRead() const { return -1; } |
| 217 virtual int GetConnectTimeMicros() const { return -1; } |
212 | 218 |
213 // Socket methods: | 219 // Socket methods: |
214 virtual int Read(IOBuffer* buf, int buf_len, | 220 virtual int Read(IOBuffer* buf, int buf_len, |
215 CompletionCallback* callback) { | 221 CompletionCallback* callback) { |
216 return ERR_FAILED; | 222 return ERR_FAILED; |
217 } | 223 } |
218 | 224 |
219 virtual int Write(IOBuffer* buf, int buf_len, | 225 virtual int Write(IOBuffer* buf, int buf_len, |
220 CompletionCallback* callback) { | 226 CompletionCallback* callback) { |
221 return ERR_FAILED; | 227 return ERR_FAILED; |
(...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1213 EXPECT_TRUE(handle.socket()); | 1219 EXPECT_TRUE(handle.socket()); |
1214 IPEndPoint endpoint; | 1220 IPEndPoint endpoint; |
1215 handle.socket()->GetLocalAddress(&endpoint); | 1221 handle.socket()->GetLocalAddress(&endpoint); |
1216 EXPECT_EQ(kIPv4AddressSize, endpoint.address().size()); | 1222 EXPECT_EQ(kIPv4AddressSize, endpoint.address().size()); |
1217 EXPECT_EQ(1, client_socket_factory_.allocation_count()); | 1223 EXPECT_EQ(1, client_socket_factory_.allocation_count()); |
1218 } | 1224 } |
1219 | 1225 |
1220 } // namespace | 1226 } // namespace |
1221 | 1227 |
1222 } // namespace net | 1228 } // namespace net |
OLD | NEW |