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

Unified Diff: net/socket/socket_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: Return fake ConnectionAttempt in MockTCPClientSocket 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/socket/socket_test_util.h ('k') | net/socket/socks5_client_socket.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/socket_test_util.cc
diff --git a/net/socket/socket_test_util.cc b/net/socket/socket_test_util.cc
index cf033c245c3e86c8b5c427c2dc061e49172b7a3a..c5861faa796cdb373be504169b7ab5bbe548e1fd 100644
--- a/net/socket/socket_test_util.cc
+++ b/net/socket/socket_test_util.cc
@@ -1006,6 +1006,10 @@ const BoundNetLog& MockClientSocket::NetLog() const {
return net_log_;
}
+void MockClientSocket::GetConnectionAttempts(ConnectionAttempts* out) const {
+ out->clear();
+}
+
void MockClientSocket::GetSSLCertRequestInfo(
SSLCertRequestInfo* cert_request_info) {
}
@@ -1148,6 +1152,22 @@ int MockTCPClientSocket::Write(IOBuffer* buf, int buf_len,
return write_result.result;
}
+void MockTCPClientSocket::GetConnectionAttempts(ConnectionAttempts* out) const {
+ int connect_result = data_->connect_data().result;
+
+ out->clear();
+ if (connected_ && connect_result != OK)
+ out->push_back(ConnectionAttempt(addresses_[0], connect_result));
+}
+
+void MockTCPClientSocket::ClearConnectionAttempts() {
+ NOTIMPLEMENTED();
+}
+
+void MockTCPClientSocket::AddConnectionAttempts(const ConnectionAttempts& in) {
+ NOTIMPLEMENTED();
+}
+
int MockTCPClientSocket::Connect(const CompletionCallback& callback) {
if (connected_)
return OK;
« no previous file with comments | « net/socket/socket_test_util.h ('k') | net/socket/socks5_client_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698