OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "content/browser/renderer_host/p2p/socket_host_test_utils.h" | 5 #include "content/browser/renderer_host/p2p/socket_host_test_utils.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/sys_byteorder.h" | 10 #include "base/sys_byteorder.h" |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 int FakeSocket::GetPeerAddress(net::IPEndPoint* address) const { | 136 int FakeSocket::GetPeerAddress(net::IPEndPoint* address) const { |
137 *address = peer_address_; | 137 *address = peer_address_; |
138 return net::OK; | 138 return net::OK; |
139 } | 139 } |
140 | 140 |
141 int FakeSocket::GetLocalAddress(net::IPEndPoint* address) const { | 141 int FakeSocket::GetLocalAddress(net::IPEndPoint* address) const { |
142 *address = local_address_; | 142 *address = local_address_; |
143 return net::OK; | 143 return net::OK; |
144 } | 144 } |
145 | 145 |
146 const net::BoundNetLog& FakeSocket::NetLog() const { | 146 const net::NetLogWithSource& FakeSocket::NetLog() const { |
147 NOTREACHED(); | 147 NOTREACHED(); |
148 return net_log_; | 148 return net_log_; |
149 } | 149 } |
150 | 150 |
151 void FakeSocket::SetSubresourceSpeculation() { | 151 void FakeSocket::SetSubresourceSpeculation() { |
152 NOTREACHED(); | 152 NOTREACHED(); |
153 } | 153 } |
154 | 154 |
155 void FakeSocket::SetOmniboxSpeculation() { | 155 void FakeSocket::SetOmniboxSpeculation() { |
156 NOTREACHED(); | 156 NOTREACHED(); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 | 211 |
212 void CreateStunError(std::vector<char>* packet) { | 212 void CreateStunError(std::vector<char>* packet) { |
213 CreateStunPacket(packet, kStunBindingError); | 213 CreateStunPacket(packet, kStunBindingError); |
214 } | 214 } |
215 | 215 |
216 net::IPEndPoint ParseAddress(const std::string& ip_str, uint16_t port) { | 216 net::IPEndPoint ParseAddress(const std::string& ip_str, uint16_t port) { |
217 net::IPAddress ip; | 217 net::IPAddress ip; |
218 EXPECT_TRUE(ip.AssignFromIPLiteral(ip_str)); | 218 EXPECT_TRUE(ip.AssignFromIPLiteral(ip_str)); |
219 return net::IPEndPoint(ip, port); | 219 return net::IPEndPoint(ip, port); |
220 } | 220 } |
OLD | NEW |