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

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: Fix !$ 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 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after
1324 } 1324 }
1325 1325
1326 int MockUDPClientSocket::SetReceiveBufferSize(int32_t size) { 1326 int MockUDPClientSocket::SetReceiveBufferSize(int32_t size) {
1327 return OK; 1327 return OK;
1328 } 1328 }
1329 1329
1330 int MockUDPClientSocket::SetSendBufferSize(int32_t size) { 1330 int MockUDPClientSocket::SetSendBufferSize(int32_t size) {
1331 return OK; 1331 return OK;
1332 } 1332 }
1333 1333
1334 int MockUDPClientSocket::SetDoNotFragment() {
1335 return OK;
1336 }
1337
1334 void MockUDPClientSocket::Close() { 1338 void MockUDPClientSocket::Close() {
1335 connected_ = false; 1339 connected_ = false;
1336 } 1340 }
1337 1341
1338 int MockUDPClientSocket::GetPeerAddress(IPEndPoint* address) const { 1342 int MockUDPClientSocket::GetPeerAddress(IPEndPoint* address) const {
1339 *address = peer_addr_; 1343 *address = peer_addr_;
1340 return OK; 1344 return OK;
1341 } 1345 }
1342 1346
1343 int MockUDPClientSocket::GetLocalAddress(IPEndPoint* address) const { 1347 int MockUDPClientSocket::GetLocalAddress(IPEndPoint* address) const {
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
1725 } 1729 }
1726 1730
1727 int64_t CountWriteBytes(const MockWrite writes[], size_t writes_size) { 1731 int64_t CountWriteBytes(const MockWrite writes[], size_t writes_size) {
1728 int64_t total = 0; 1732 int64_t total = 0;
1729 for (const MockWrite* write = writes; write != writes + writes_size; ++write) 1733 for (const MockWrite* write = writes; write != writes + writes_size; ++write)
1730 total += write->data_len; 1734 total += write->data_len;
1731 return total; 1735 return total;
1732 } 1736 }
1733 1737
1734 } // namespace net 1738 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698