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

Side by Side Diff: net/server/http_server_unittest.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 unified diff | Download patch
« no previous file with comments | « net/http/http_stream_factory_impl_job.cc ('k') | net/socket/client_socket_handle.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <algorithm> 5 #include <algorithm>
6 #include <utility> 6 #include <utility>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 return ERR_NOT_IMPLEMENTED; 490 return ERR_NOT_IMPLEMENTED;
491 } 491 }
492 const BoundNetLog& NetLog() const override { return net_log_; } 492 const BoundNetLog& NetLog() const override { return net_log_; }
493 void SetSubresourceSpeculation() override {} 493 void SetSubresourceSpeculation() override {}
494 void SetOmniboxSpeculation() override {} 494 void SetOmniboxSpeculation() override {}
495 bool WasEverUsed() const override { return true; } 495 bool WasEverUsed() const override { return true; }
496 bool UsingTCPFastOpen() const override { return false; } 496 bool UsingTCPFastOpen() const override { return false; }
497 bool WasNpnNegotiated() const override { return false; } 497 bool WasNpnNegotiated() const override { return false; }
498 NextProto GetNegotiatedProtocol() const override { return kProtoUnknown; } 498 NextProto GetNegotiatedProtocol() const override { return kProtoUnknown; }
499 bool GetSSLInfo(SSLInfo* ssl_info) override { return false; } 499 bool GetSSLInfo(SSLInfo* ssl_info) override { return false; }
500 void GetConnectionAttempts(ConnectionAttempts* out) const override {
501 out->clear();
502 }
503 void ClearConnectionAttempts() override {}
504 void AddConnectionAttempts(const ConnectionAttempts& attempts) override {}
500 505
501 // Socket 506 // Socket
502 int Read(IOBuffer* buf, 507 int Read(IOBuffer* buf,
503 int buf_len, 508 int buf_len,
504 const CompletionCallback& callback) override { 509 const CompletionCallback& callback) override {
505 if (!connected_) { 510 if (!connected_) {
506 return ERR_SOCKET_NOT_CONNECTED; 511 return ERR_SOCKET_NOT_CONNECTED;
507 } 512 }
508 if (pending_read_data_.empty()) { 513 if (pending_read_data_.empty()) {
509 read_buf_ = buf; 514 read_buf_ = buf;
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 ASSERT_EQ(OK, client.ConnectAndWait(server_address_)); 633 ASSERT_EQ(OK, client.ConnectAndWait(server_address_));
629 client.Send("GET / HTTP/1.1\r\n\r\n"); 634 client.Send("GET / HTTP/1.1\r\n\r\n");
630 ASSERT_FALSE(RunUntilRequestsReceived(1)); 635 ASSERT_FALSE(RunUntilRequestsReceived(1));
631 ASSERT_EQ(1ul, connection_ids_.size()); 636 ASSERT_EQ(1ul, connection_ids_.size());
632 ASSERT_EQ(0ul, requests_.size()); 637 ASSERT_EQ(0ul, requests_.size());
633 } 638 }
634 639
635 } // namespace 640 } // namespace
636 641
637 } // namespace net 642 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_stream_factory_impl_job.cc ('k') | net/socket/client_socket_handle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698