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 <stddef.h> | 5 #include <stddef.h> |
6 #include <string> | 6 #include <string> |
7 #include <sys/epoll.h> | 7 #include <sys/epoll.h> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 return params; | 159 return params; |
160 } | 160 } |
161 | 161 |
162 class ServerDelegate : public PacketDroppingTestWriter::Delegate { | 162 class ServerDelegate : public PacketDroppingTestWriter::Delegate { |
163 public: | 163 public: |
164 ServerDelegate(TestWriterFactory* writer_factory, | 164 ServerDelegate(TestWriterFactory* writer_factory, |
165 QuicDispatcher* dispatcher) | 165 QuicDispatcher* dispatcher) |
166 : writer_factory_(writer_factory), | 166 : writer_factory_(writer_factory), |
167 dispatcher_(dispatcher) {} | 167 dispatcher_(dispatcher) {} |
168 virtual ~ServerDelegate() {} | 168 virtual ~ServerDelegate() {} |
169 virtual void OnPacketSent(WriteResult result) override { | 169 virtual void OnPacketSent(WriteResult result) OVERRIDE { |
170 writer_factory_->OnPacketSent(result); | 170 writer_factory_->OnPacketSent(result); |
171 } | 171 } |
172 virtual void OnCanWrite() OVERRIDE { dispatcher_->OnCanWrite(); } | 172 virtual void OnCanWrite() OVERRIDE { dispatcher_->OnCanWrite(); } |
173 private: | 173 private: |
174 TestWriterFactory* writer_factory_; | 174 TestWriterFactory* writer_factory_; |
175 QuicDispatcher* dispatcher_; | 175 QuicDispatcher* dispatcher_; |
176 }; | 176 }; |
177 | 177 |
178 class ClientDelegate : public PacketDroppingTestWriter::Delegate { | 178 class ClientDelegate : public PacketDroppingTestWriter::Delegate { |
179 public: | 179 public: |
(...skipping 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1388 QuicSession* session = dispatcher->session_map().begin()->second; | 1388 QuicSession* session = dispatcher->session_map().begin()->second; |
1389 EXPECT_EQ(0u, QuicSessionPeer::GetLocallyClosedStreamsHighestOffset( | 1389 EXPECT_EQ(0u, QuicSessionPeer::GetLocallyClosedStreamsHighestOffset( |
1390 session).size()); | 1390 session).size()); |
1391 server_thread_->Resume(); | 1391 server_thread_->Resume(); |
1392 } | 1392 } |
1393 | 1393 |
1394 } // namespace | 1394 } // namespace |
1395 } // namespace test | 1395 } // namespace test |
1396 } // namespace tools | 1396 } // namespace tools |
1397 } // namespace net | 1397 } // namespace net |
OLD | NEW |