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

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

Issue 914853002: Add CHECK() in UdpSocketLibevent to debug crbug.com/452121 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « net/socket/socket_test_util.h ('k') | net/udp/datagram_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/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1184 matching lines...) Expand 10 before | Expand all | Expand 10 after
1195 } 1195 }
1196 1196
1197 int DeterministicMockUDPClientSocket::SetReceiveBufferSize(int32 size) { 1197 int DeterministicMockUDPClientSocket::SetReceiveBufferSize(int32 size) {
1198 return OK; 1198 return OK;
1199 } 1199 }
1200 1200
1201 int DeterministicMockUDPClientSocket::SetSendBufferSize(int32 size) { 1201 int DeterministicMockUDPClientSocket::SetSendBufferSize(int32 size) {
1202 return OK; 1202 return OK;
1203 } 1203 }
1204 1204
1205 void DeterministicMockUDPClientSocket::Close() { 1205 int DeterministicMockUDPClientSocket::Close() {
1206 connected_ = false; 1206 connected_ = false;
1207 return OK;
1207 } 1208 }
1208 1209
1209 int DeterministicMockUDPClientSocket::GetPeerAddress( 1210 int DeterministicMockUDPClientSocket::GetPeerAddress(
1210 IPEndPoint* address) const { 1211 IPEndPoint* address) const {
1211 *address = peer_address_; 1212 *address = peer_address_;
1212 return OK; 1213 return OK;
1213 } 1214 }
1214 1215
1215 int DeterministicMockUDPClientSocket::GetLocalAddress( 1216 int DeterministicMockUDPClientSocket::GetLocalAddress(
1216 IPEndPoint* address) const { 1217 IPEndPoint* address) const {
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
1608 } 1609 }
1609 1610
1610 int MockUDPClientSocket::SetReceiveBufferSize(int32 size) { 1611 int MockUDPClientSocket::SetReceiveBufferSize(int32 size) {
1611 return OK; 1612 return OK;
1612 } 1613 }
1613 1614
1614 int MockUDPClientSocket::SetSendBufferSize(int32 size) { 1615 int MockUDPClientSocket::SetSendBufferSize(int32 size) {
1615 return OK; 1616 return OK;
1616 } 1617 }
1617 1618
1618 void MockUDPClientSocket::Close() { 1619 int MockUDPClientSocket::Close() {
1619 connected_ = false; 1620 connected_ = false;
1621 return OK;
1620 } 1622 }
1621 1623
1622 int MockUDPClientSocket::GetPeerAddress(IPEndPoint* address) const { 1624 int MockUDPClientSocket::GetPeerAddress(IPEndPoint* address) const {
1623 *address = peer_addr_; 1625 *address = peer_addr_;
1624 return OK; 1626 return OK;
1625 } 1627 }
1626 1628
1627 int MockUDPClientSocket::GetLocalAddress(IPEndPoint* address) const { 1629 int MockUDPClientSocket::GetLocalAddress(IPEndPoint* address) const {
1628 IPAddressNumber ip; 1630 IPAddressNumber ip;
1629 bool rv = ParseIPLiteralToNumber("192.0.2.33", &ip); 1631 bool rv = ParseIPLiteralToNumber("192.0.2.33", &ip);
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
2013 2015
2014 const char kSOCKS5OkRequest[] = 2016 const char kSOCKS5OkRequest[] =
2015 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 }; 2017 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 };
2016 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest); 2018 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest);
2017 2019
2018 const char kSOCKS5OkResponse[] = 2020 const char kSOCKS5OkResponse[] =
2019 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 }; 2021 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 };
2020 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse); 2022 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse);
2021 2023
2022 } // namespace net 2024 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/socket_test_util.h ('k') | net/udp/datagram_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698