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

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

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 #include "net/socket/socket_test_util.h" 5 #include "net/socket/socket_test_util.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 } 767 }
768 768
769 int MockClientSocket::SetReceiveBufferSize(int32_t size) { 769 int MockClientSocket::SetReceiveBufferSize(int32_t size) {
770 return OK; 770 return OK;
771 } 771 }
772 772
773 int MockClientSocket::SetSendBufferSize(int32_t size) { 773 int MockClientSocket::SetSendBufferSize(int32_t size) {
774 return OK; 774 return OK;
775 } 775 }
776 776
777 int MockClientSocket::SetDoNotFragment(bool do_not_fragment) {
778 return OK;
779 }
780
777 void MockClientSocket::Disconnect() { 781 void MockClientSocket::Disconnect() {
778 connected_ = false; 782 connected_ = false;
779 } 783 }
780 784
781 bool MockClientSocket::IsConnected() const { 785 bool MockClientSocket::IsConnected() const {
782 return connected_; 786 return connected_;
783 } 787 }
784 788
785 bool MockClientSocket::IsConnectedAndIdle() const { 789 bool MockClientSocket::IsConnectedAndIdle() const {
786 return connected_; 790 return connected_;
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
1329 } 1333 }
1330 1334
1331 int MockUDPClientSocket::SetReceiveBufferSize(int32_t size) { 1335 int MockUDPClientSocket::SetReceiveBufferSize(int32_t size) {
1332 return OK; 1336 return OK;
1333 } 1337 }
1334 1338
1335 int MockUDPClientSocket::SetSendBufferSize(int32_t size) { 1339 int MockUDPClientSocket::SetSendBufferSize(int32_t size) {
1336 return OK; 1340 return OK;
1337 } 1341 }
1338 1342
1343 int MockUDPClientSocket::SetDoNotFragment(bool do_not_fragment) {
1344 return OK;
1345 }
1346
1339 void MockUDPClientSocket::Close() { 1347 void MockUDPClientSocket::Close() {
1340 connected_ = false; 1348 connected_ = false;
1341 } 1349 }
1342 1350
1343 int MockUDPClientSocket::GetPeerAddress(IPEndPoint* address) const { 1351 int MockUDPClientSocket::GetPeerAddress(IPEndPoint* address) const {
1344 *address = peer_addr_; 1352 *address = peer_addr_;
1345 return OK; 1353 return OK;
1346 } 1354 }
1347 1355
1348 int MockUDPClientSocket::GetLocalAddress(IPEndPoint* address) const { 1356 int MockUDPClientSocket::GetLocalAddress(IPEndPoint* address) const {
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
1730 } 1738 }
1731 1739
1732 int64_t CountWriteBytes(const MockWrite writes[], size_t writes_size) { 1740 int64_t CountWriteBytes(const MockWrite writes[], size_t writes_size) {
1733 int64_t total = 0; 1741 int64_t total = 0;
1734 for (const MockWrite* write = writes; write != writes + writes_size; ++write) 1742 for (const MockWrite* write = writes; write != writes + writes_size; ++write)
1735 total += write->data_len; 1743 total += write->data_len;
1736 return total; 1744 return total;
1737 } 1745 }
1738 1746
1739 } // namespace net 1747 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698