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

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

Issue 1541003003: Makes DatagramClientSocket::GetBoundNetwork const. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@quicreader
Patch Set: Created 5 years 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
« no previous file with comments | « net/socket/socket_test_util.h ('k') | net/udp/datagram_client_socket.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1330 matching lines...) Expand 10 before | Expand all | Expand 10 after
1341 1341
1342 int MockUDPClientSocket::BindToNetwork( 1342 int MockUDPClientSocket::BindToNetwork(
1343 NetworkChangeNotifier::NetworkHandle network) { 1343 NetworkChangeNotifier::NetworkHandle network) {
1344 return ERR_NOT_IMPLEMENTED; 1344 return ERR_NOT_IMPLEMENTED;
1345 } 1345 }
1346 1346
1347 int MockUDPClientSocket::BindToDefaultNetwork() { 1347 int MockUDPClientSocket::BindToDefaultNetwork() {
1348 return ERR_NOT_IMPLEMENTED; 1348 return ERR_NOT_IMPLEMENTED;
1349 } 1349 }
1350 1350
1351 NetworkChangeNotifier::NetworkHandle MockUDPClientSocket::GetBoundNetwork() { 1351 NetworkChangeNotifier::NetworkHandle MockUDPClientSocket::GetBoundNetwork()
1352 const {
1352 return NetworkChangeNotifier::kInvalidNetworkHandle; 1353 return NetworkChangeNotifier::kInvalidNetworkHandle;
1353 } 1354 }
1354 1355
1355 int MockUDPClientSocket::Connect(const IPEndPoint& address) { 1356 int MockUDPClientSocket::Connect(const IPEndPoint& address) {
1356 if (!data_) 1357 if (!data_)
1357 return ERR_UNEXPECTED; 1358 return ERR_UNEXPECTED;
1358 connected_ = true; 1359 connected_ = true;
1359 peer_addr_ = address; 1360 peer_addr_ = address;
1360 return data_->connect_data().result; 1361 return data_->connect_data().result;
1361 } 1362 }
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
1695 } 1696 }
1696 1697
1697 int64_t CountWriteBytes(const MockWrite writes[], size_t writes_size) { 1698 int64_t CountWriteBytes(const MockWrite writes[], size_t writes_size) {
1698 int64_t total = 0; 1699 int64_t total = 0;
1699 for (const MockWrite* write = writes; write != writes + writes_size; ++write) 1700 for (const MockWrite* write = writes; write != writes + writes_size; ++write)
1700 total += write->data_len; 1701 total += write->data_len;
1701 return total; 1702 return total;
1702 } 1703 }
1703 1704
1704 } // namespace net 1705 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/socket_test_util.h ('k') | net/udp/datagram_client_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698