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/quic/quic_connection.h" | 5 #include "net/quic/quic_connection.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 return WriteResult(WRITE_STATUS_BLOCKED, -1); | 308 return WriteResult(WRITE_STATUS_BLOCKED, -1); |
309 } | 309 } |
310 last_packet_size_ = packet.length(); | 310 last_packet_size_ = packet.length(); |
311 return WriteResult(WRITE_STATUS_OK, last_packet_size_); | 311 return WriteResult(WRITE_STATUS_OK, last_packet_size_); |
312 } | 312 } |
313 | 313 |
314 virtual bool IsWriteBlockedDataBuffered() const OVERRIDE { | 314 virtual bool IsWriteBlockedDataBuffered() const OVERRIDE { |
315 return is_write_blocked_data_buffered_; | 315 return is_write_blocked_data_buffered_; |
316 } | 316 } |
317 | 317 |
318 virtual bool IsWriteBlocked() const { return write_blocked_; } | 318 virtual bool IsWriteBlocked() const OVERRIDE { return write_blocked_; } |
319 | 319 |
320 virtual void SetWritable() { write_blocked_ = false; } | 320 virtual void SetWritable() OVERRIDE { write_blocked_ = false; } |
321 | 321 |
322 void SetWriteBlocked() { write_blocked_ = true; } | 322 void SetWriteBlocked() { write_blocked_ = true; } |
323 | 323 |
324 // Resets the visitor's state by clearing out the headers and frames. | 324 // Resets the visitor's state by clearing out the headers and frames. |
325 void Reset() { | 325 void Reset() { |
326 visitor_.Reset(); | 326 visitor_.Reset(); |
327 } | 327 } |
328 | 328 |
329 QuicPacketHeader* header() { return visitor_.header(); } | 329 QuicPacketHeader* header() { return visitor_.header(); } |
330 | 330 |
(...skipping 3028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3359 true); | 3359 true); |
3360 TestConnection client(guid_, IPEndPoint(), helper_.get(), writer_.get(), | 3360 TestConnection client(guid_, IPEndPoint(), helper_.get(), writer_.get(), |
3361 false); | 3361 false); |
3362 EXPECT_TRUE(client.sent_packet_manager().using_pacing()); | 3362 EXPECT_TRUE(client.sent_packet_manager().using_pacing()); |
3363 EXPECT_FALSE(server.sent_packet_manager().using_pacing()); | 3363 EXPECT_FALSE(server.sent_packet_manager().using_pacing()); |
3364 } | 3364 } |
3365 | 3365 |
3366 } // namespace | 3366 } // namespace |
3367 } // namespace test | 3367 } // namespace test |
3368 } // namespace net | 3368 } // namespace net |
OLD | NEW |