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

Side by Side Diff: net/socket/socket_test_util.h

Issue 2235973002: Add a SetDoNotFragment() method to DatagramSocket, and call this for (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Blimp Created 4 years, 4 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
OLDNEW
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 #ifndef NET_SOCKET_SOCKET_TEST_UTIL_H_ 5 #ifndef NET_SOCKET_SOCKET_TEST_UTIL_H_
6 #define NET_SOCKET_SOCKET_TEST_UTIL_H_ 6 #define NET_SOCKET_SOCKET_TEST_UTIL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 553
554 // Socket implementation. 554 // Socket implementation.
555 int Read(IOBuffer* buf, 555 int Read(IOBuffer* buf,
556 int buf_len, 556 int buf_len,
557 const CompletionCallback& callback) override = 0; 557 const CompletionCallback& callback) override = 0;
558 int Write(IOBuffer* buf, 558 int Write(IOBuffer* buf,
559 int buf_len, 559 int buf_len,
560 const CompletionCallback& callback) override = 0; 560 const CompletionCallback& callback) override = 0;
561 int SetReceiveBufferSize(int32_t size) override; 561 int SetReceiveBufferSize(int32_t size) override;
562 int SetSendBufferSize(int32_t size) override; 562 int SetSendBufferSize(int32_t size) override;
563 int SetDoNotFragment(bool do_not_fragment) override;
563 564
564 // StreamSocket implementation. 565 // StreamSocket implementation.
565 int Connect(const CompletionCallback& callback) override = 0; 566 int Connect(const CompletionCallback& callback) override = 0;
566 void Disconnect() override; 567 void Disconnect() override;
567 bool IsConnected() const override; 568 bool IsConnected() const override;
568 bool IsConnectedAndIdle() const override; 569 bool IsConnectedAndIdle() const override;
569 int GetPeerAddress(IPEndPoint* address) const override; 570 int GetPeerAddress(IPEndPoint* address) const override;
570 int GetLocalAddress(IPEndPoint* address) const override; 571 int GetLocalAddress(IPEndPoint* address) const override;
571 const BoundNetLog& NetLog() const override; 572 const BoundNetLog& NetLog() const override;
572 void SetSubresourceSpeculation() override {} 573 void SetSubresourceSpeculation() override {}
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 734
734 // Socket implementation. 735 // Socket implementation.
735 int Read(IOBuffer* buf, 736 int Read(IOBuffer* buf,
736 int buf_len, 737 int buf_len,
737 const CompletionCallback& callback) override; 738 const CompletionCallback& callback) override;
738 int Write(IOBuffer* buf, 739 int Write(IOBuffer* buf,
739 int buf_len, 740 int buf_len,
740 const CompletionCallback& callback) override; 741 const CompletionCallback& callback) override;
741 int SetReceiveBufferSize(int32_t size) override; 742 int SetReceiveBufferSize(int32_t size) override;
742 int SetSendBufferSize(int32_t size) override; 743 int SetSendBufferSize(int32_t size) override;
744 int SetDoNotFragment(bool do_not_fragment) override;
743 745
744 // DatagramSocket implementation. 746 // DatagramSocket implementation.
745 void Close() override; 747 void Close() override;
746 int GetPeerAddress(IPEndPoint* address) const override; 748 int GetPeerAddress(IPEndPoint* address) const override;
747 int GetLocalAddress(IPEndPoint* address) const override; 749 int GetLocalAddress(IPEndPoint* address) const override;
748 const BoundNetLog& NetLog() const override; 750 const BoundNetLog& NetLog() const override;
749 751
750 // DatagramClientSocket implementation. 752 // DatagramClientSocket implementation.
751 int Connect(const IPEndPoint& address) override; 753 int Connect(const IPEndPoint& address) override;
752 int ConnectUsingNetwork(NetworkChangeNotifier::NetworkHandle network, 754 int ConnectUsingNetwork(NetworkChangeNotifier::NetworkHandle network,
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
1007 1009
1008 // Helper function to get the total data size of the MockReads in |reads|. 1010 // Helper function to get the total data size of the MockReads in |reads|.
1009 int64_t CountReadBytes(const MockRead reads[], size_t reads_size); 1011 int64_t CountReadBytes(const MockRead reads[], size_t reads_size);
1010 1012
1011 // Helper function to get the total data size of the MockWrites in |writes|. 1013 // Helper function to get the total data size of the MockWrites in |writes|.
1012 int64_t CountWriteBytes(const MockWrite writes[], size_t writes_size); 1014 int64_t CountWriteBytes(const MockWrite writes[], size_t writes_size);
1013 1015
1014 } // namespace net 1016 } // namespace net
1015 1017
1016 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_ 1018 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698