| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/http/http_stream_factory_impl.h" | 5 #include "net/http/http_stream_factory_impl.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 789 base::RunLoop loop_; | 789 base::RunLoop loop_; |
| 790 SpdyHeaderBlock response_headers_; | 790 SpdyHeaderBlock response_headers_; |
| 791 }; | 791 }; |
| 792 | 792 |
| 793 // Helper class to encapsulate MockReads and MockWrites for QUIC. | 793 // Helper class to encapsulate MockReads and MockWrites for QUIC. |
| 794 // Simplify ownership issues and the interaction with the MockSocketFactory. | 794 // Simplify ownership issues and the interaction with the MockSocketFactory. |
| 795 class MockQuicData { | 795 class MockQuicData { |
| 796 public: | 796 public: |
| 797 MockQuicData() : packet_number_(0) {} | 797 MockQuicData() : packet_number_(0) {} |
| 798 | 798 |
| 799 ~MockQuicData() { STLDeleteElements(&packets_); } | 799 ~MockQuicData() { base::STLDeleteElements(&packets_); } |
| 800 | 800 |
| 801 void AddRead(std::unique_ptr<QuicEncryptedPacket> packet) { | 801 void AddRead(std::unique_ptr<QuicEncryptedPacket> packet) { |
| 802 reads_.push_back( | 802 reads_.push_back( |
| 803 MockRead(ASYNC, packet->data(), packet->length(), packet_number_++)); | 803 MockRead(ASYNC, packet->data(), packet->length(), packet_number_++)); |
| 804 packets_.push_back(packet.release()); | 804 packets_.push_back(packet.release()); |
| 805 } | 805 } |
| 806 | 806 |
| 807 void AddRead(IoMode mode, int rv) { | 807 void AddRead(IoMode mode, int rv) { |
| 808 reads_.push_back(MockRead(mode, rv, packet_number_++)); | 808 reads_.push_back(MockRead(mode, rv, packet_number_++)); |
| 809 } | 809 } |
| (...skipping 1246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2056 session->GetTransportSocketPool( | 2056 session->GetTransportSocketPool( |
| 2057 HttpNetworkSession::WEBSOCKET_SOCKET_POOL))); | 2057 HttpNetworkSession::WEBSOCKET_SOCKET_POOL))); |
| 2058 EXPECT_EQ(1, GetSocketPoolGroupCount( | 2058 EXPECT_EQ(1, GetSocketPoolGroupCount( |
| 2059 session->GetSSLSocketPool(HttpNetworkSession::WEBSOCKET_SOCKET_POOL))); | 2059 session->GetSSLSocketPool(HttpNetworkSession::WEBSOCKET_SOCKET_POOL))); |
| 2060 EXPECT_TRUE(waiter.used_proxy_info().is_direct()); | 2060 EXPECT_TRUE(waiter.used_proxy_info().is_direct()); |
| 2061 } | 2061 } |
| 2062 | 2062 |
| 2063 } // namespace | 2063 } // namespace |
| 2064 | 2064 |
| 2065 } // namespace net | 2065 } // namespace net |
| OLD | NEW |