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

Side by Side Diff: net/socket/transport_client_socket_pool_test_util.cc

Issue 1096203006: Collect all ConnectionAttempts from both sockets in TransportConnectJob. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@domrel_serverip1
Patch Set: Make requested changes; rebase Created 5 years, 7 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_test_util.h" 5 #include "net/socket/transport_client_socket_pool_test_util.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 const BoundNetLog& NetLog() const override { return net_log_; } 62 const BoundNetLog& NetLog() const override { return net_log_; }
63 63
64 void SetSubresourceSpeculation() override {} 64 void SetSubresourceSpeculation() override {}
65 void SetOmniboxSpeculation() override {} 65 void SetOmniboxSpeculation() override {}
66 bool WasEverUsed() const override { return false; } 66 bool WasEverUsed() const override { return false; }
67 void EnableTCPFastOpenIfSupported() override { use_tcp_fastopen_ = true; } 67 void EnableTCPFastOpenIfSupported() override { use_tcp_fastopen_ = true; }
68 bool UsingTCPFastOpen() const override { return use_tcp_fastopen_; } 68 bool UsingTCPFastOpen() const override { return use_tcp_fastopen_; }
69 bool WasNpnNegotiated() const override { return false; } 69 bool WasNpnNegotiated() const override { return false; }
70 NextProto GetNegotiatedProtocol() const override { return kProtoUnknown; } 70 NextProto GetNegotiatedProtocol() const override { return kProtoUnknown; }
71 bool GetSSLInfo(SSLInfo* ssl_info) override { return false; } 71 bool GetSSLInfo(SSLInfo* ssl_info) override { return false; }
72 void GetConnectionAttempts(ConnectionAttempts* out) const override {
73 out->clear();
74 }
75 void ClearConnectionAttempts() override {}
76 void AddConnectionAttempts(const ConnectionAttempts& attempts) override {}
72 77
73 // Socket implementation. 78 // Socket implementation.
74 int Read(IOBuffer* buf, 79 int Read(IOBuffer* buf,
75 int buf_len, 80 int buf_len,
76 const CompletionCallback& callback) override { 81 const CompletionCallback& callback) override {
77 return ERR_FAILED; 82 return ERR_FAILED;
78 } 83 }
79 int Write(IOBuffer* buf, 84 int Write(IOBuffer* buf,
80 int buf_len, 85 int buf_len,
81 const CompletionCallback& callback) override { 86 const CompletionCallback& callback) override {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 const BoundNetLog& NetLog() const override { return net_log_; } 123 const BoundNetLog& NetLog() const override { return net_log_; }
119 124
120 void SetSubresourceSpeculation() override {} 125 void SetSubresourceSpeculation() override {}
121 void SetOmniboxSpeculation() override {} 126 void SetOmniboxSpeculation() override {}
122 bool WasEverUsed() const override { return false; } 127 bool WasEverUsed() const override { return false; }
123 void EnableTCPFastOpenIfSupported() override { use_tcp_fastopen_ = true; } 128 void EnableTCPFastOpenIfSupported() override { use_tcp_fastopen_ = true; }
124 bool UsingTCPFastOpen() const override { return use_tcp_fastopen_; } 129 bool UsingTCPFastOpen() const override { return use_tcp_fastopen_; }
125 bool WasNpnNegotiated() const override { return false; } 130 bool WasNpnNegotiated() const override { return false; }
126 NextProto GetNegotiatedProtocol() const override { return kProtoUnknown; } 131 NextProto GetNegotiatedProtocol() const override { return kProtoUnknown; }
127 bool GetSSLInfo(SSLInfo* ssl_info) override { return false; } 132 bool GetSSLInfo(SSLInfo* ssl_info) override { return false; }
133 void GetConnectionAttempts(ConnectionAttempts* out) const override {
134 out->clear();
135 }
136 void ClearConnectionAttempts() override {}
137 void AddConnectionAttempts(const ConnectionAttempts& attempts) override {}
128 138
129 // Socket implementation. 139 // Socket implementation.
130 int Read(IOBuffer* buf, 140 int Read(IOBuffer* buf,
131 int buf_len, 141 int buf_len,
132 const CompletionCallback& callback) override { 142 const CompletionCallback& callback) override {
133 return ERR_FAILED; 143 return ERR_FAILED;
134 } 144 }
135 145
136 int Write(IOBuffer* buf, 146 int Write(IOBuffer* buf,
137 int buf_len, 147 int buf_len,
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 const BoundNetLog& NetLog() const override { return net_log_; } 239 const BoundNetLog& NetLog() const override { return net_log_; }
230 240
231 void SetSubresourceSpeculation() override {} 241 void SetSubresourceSpeculation() override {}
232 void SetOmniboxSpeculation() override {} 242 void SetOmniboxSpeculation() override {}
233 bool WasEverUsed() const override { return false; } 243 bool WasEverUsed() const override { return false; }
234 void EnableTCPFastOpenIfSupported() override { use_tcp_fastopen_ = true; } 244 void EnableTCPFastOpenIfSupported() override { use_tcp_fastopen_ = true; }
235 bool UsingTCPFastOpen() const override { return use_tcp_fastopen_; } 245 bool UsingTCPFastOpen() const override { return use_tcp_fastopen_; }
236 bool WasNpnNegotiated() const override { return false; } 246 bool WasNpnNegotiated() const override { return false; }
237 NextProto GetNegotiatedProtocol() const override { return kProtoUnknown; } 247 NextProto GetNegotiatedProtocol() const override { return kProtoUnknown; }
238 bool GetSSLInfo(SSLInfo* ssl_info) override { return false; } 248 bool GetSSLInfo(SSLInfo* ssl_info) override { return false; }
249 void GetConnectionAttempts(ConnectionAttempts* out) const override {
250 out->clear();
251 }
252 void ClearConnectionAttempts() override {}
253 void AddConnectionAttempts(const ConnectionAttempts& attempts) override {}
239 254
240 // Socket implementation. 255 // Socket implementation.
241 int Read(IOBuffer* buf, 256 int Read(IOBuffer* buf,
242 int buf_len, 257 int buf_len,
243 const CompletionCallback& callback) override { 258 const CompletionCallback& callback) override {
244 return ERR_FAILED; 259 return ERR_FAILED;
245 } 260 }
246 261
247 int Write(IOBuffer* buf, 262 int Write(IOBuffer* buf,
248 int buf_len, 263 int buf_len,
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 run_loop_quit_closure_ = run_loop.QuitClosure(); 430 run_loop_quit_closure_ = run_loop.QuitClosure();
416 run_loop.Run(); 431 run_loop.Run();
417 run_loop_quit_closure_.Reset(); 432 run_loop_quit_closure_.Reset();
418 } 433 }
419 base::Closure trigger = triggerable_sockets_.front(); 434 base::Closure trigger = triggerable_sockets_.front();
420 triggerable_sockets_.pop(); 435 triggerable_sockets_.pop();
421 return trigger; 436 return trigger;
422 } 437 }
423 438
424 } // namespace net 439 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698