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 base::TimeDelta GetConnectTimeMicros() const { | |
90 return base::TimeDelta::FromMicroseconds(-1); | |
91 } | |
92 | 88 |
93 // Socket methods: | 89 // Socket methods: |
94 virtual int Read(IOBuffer* buf, int buf_len, | 90 virtual int Read(IOBuffer* buf, int buf_len, |
95 CompletionCallback* callback) { | 91 CompletionCallback* callback) { |
96 return ERR_FAILED; | 92 return ERR_FAILED; |
97 } | 93 } |
98 virtual int Write(IOBuffer* buf, int buf_len, | 94 virtual int Write(IOBuffer* buf, int buf_len, |
99 CompletionCallback* callback) { | 95 CompletionCallback* callback) { |
100 return ERR_FAILED; | 96 return ERR_FAILED; |
101 } | 97 } |
(...skipping 30 matching lines...) Expand all Loading... |
132 return ERR_UNEXPECTED; | 128 return ERR_UNEXPECTED; |
133 } | 129 } |
134 virtual const BoundNetLog& NetLog() const { | 130 virtual const BoundNetLog& NetLog() const { |
135 return net_log_; | 131 return net_log_; |
136 } | 132 } |
137 | 133 |
138 virtual void SetSubresourceSpeculation() {} | 134 virtual void SetSubresourceSpeculation() {} |
139 virtual void SetOmniboxSpeculation() {} | 135 virtual void SetOmniboxSpeculation() {} |
140 virtual bool WasEverUsed() const { return false; } | 136 virtual bool WasEverUsed() const { return false; } |
141 virtual bool UsingTCPFastOpen() const { return false; } | 137 virtual bool UsingTCPFastOpen() const { return false; } |
142 virtual int64 NumBytesRead() const { return -1; } | |
143 virtual base::TimeDelta GetConnectTimeMicros() const { | |
144 return base::TimeDelta::FromMicroseconds(-1); | |
145 } | |
146 | 138 |
147 // Socket methods: | 139 // Socket methods: |
148 virtual int Read(IOBuffer* buf, int buf_len, | 140 virtual int Read(IOBuffer* buf, int buf_len, |
149 CompletionCallback* callback) { | 141 CompletionCallback* callback) { |
150 return ERR_FAILED; | 142 return ERR_FAILED; |
151 } | 143 } |
152 | 144 |
153 virtual int Write(IOBuffer* buf, int buf_len, | 145 virtual int Write(IOBuffer* buf, int buf_len, |
154 CompletionCallback* callback) { | 146 CompletionCallback* callback) { |
155 return ERR_FAILED; | 147 return ERR_FAILED; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 return OK; | 202 return OK; |
211 } | 203 } |
212 virtual const BoundNetLog& NetLog() const { | 204 virtual const BoundNetLog& NetLog() const { |
213 return net_log_; | 205 return net_log_; |
214 } | 206 } |
215 | 207 |
216 virtual void SetSubresourceSpeculation() {} | 208 virtual void SetSubresourceSpeculation() {} |
217 virtual void SetOmniboxSpeculation() {} | 209 virtual void SetOmniboxSpeculation() {} |
218 virtual bool WasEverUsed() const { return false; } | 210 virtual bool WasEverUsed() const { return false; } |
219 virtual bool UsingTCPFastOpen() const { return false; } | 211 virtual bool UsingTCPFastOpen() const { return false; } |
220 virtual int64 NumBytesRead() const { return -1; } | |
221 virtual base::TimeDelta GetConnectTimeMicros() const { | |
222 return base::TimeDelta::FromMicroseconds(-1); | |
223 } | |
224 | 212 |
225 // Socket methods: | 213 // Socket methods: |
226 virtual int Read(IOBuffer* buf, int buf_len, | 214 virtual int Read(IOBuffer* buf, int buf_len, |
227 CompletionCallback* callback) { | 215 CompletionCallback* callback) { |
228 return ERR_FAILED; | 216 return ERR_FAILED; |
229 } | 217 } |
230 | 218 |
231 virtual int Write(IOBuffer* buf, int buf_len, | 219 virtual int Write(IOBuffer* buf, int buf_len, |
232 CompletionCallback* callback) { | 220 CompletionCallback* callback) { |
233 return ERR_FAILED; | 221 return ERR_FAILED; |
(...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1232 EXPECT_TRUE(handle.socket()); | 1220 EXPECT_TRUE(handle.socket()); |
1233 IPEndPoint endpoint; | 1221 IPEndPoint endpoint; |
1234 handle.socket()->GetLocalAddress(&endpoint); | 1222 handle.socket()->GetLocalAddress(&endpoint); |
1235 EXPECT_EQ(kIPv4AddressSize, endpoint.address().size()); | 1223 EXPECT_EQ(kIPv4AddressSize, endpoint.address().size()); |
1236 EXPECT_EQ(1, client_socket_factory_.allocation_count()); | 1224 EXPECT_EQ(1, client_socket_factory_.allocation_count()); |
1237 } | 1225 } |
1238 | 1226 |
1239 } // namespace | 1227 } // namespace |
1240 | 1228 |
1241 } // namespace net | 1229 } // namespace net |
OLD | NEW |