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

Side by Side Diff: content/browser/renderer_host/p2p/socket_host_test_utils.cc

Issue 655063002: Use uint16 for port numbers more pervasively. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert bad change Created 6 years, 1 month 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) 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 "base/sys_byteorder.h" 7 #include "base/sys_byteorder.h"
8 #include "base/thread_task_runner_handle.h" 8 #include "base/thread_task_runner_handle.h"
9 #include "net/base/completion_callback.h" 9 #include "net/base/completion_callback.h"
10 #include "net/base/io_buffer.h" 10 #include "net/base/io_buffer.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 } 197 }
198 198
199 void CreateStunResponse(std::vector<char>* packet) { 199 void CreateStunResponse(std::vector<char>* packet) {
200 CreateStunPacket(packet, kStunBindingResponse); 200 CreateStunPacket(packet, kStunBindingResponse);
201 } 201 }
202 202
203 void CreateStunError(std::vector<char>* packet) { 203 void CreateStunError(std::vector<char>* packet) {
204 CreateStunPacket(packet, kStunBindingError); 204 CreateStunPacket(packet, kStunBindingError);
205 } 205 }
206 206
207 net::IPEndPoint ParseAddress(const std::string ip_str, int port) { 207 net::IPEndPoint ParseAddress(const std::string ip_str, uint16 port) {
208 net::IPAddressNumber ip; 208 net::IPAddressNumber ip;
209 EXPECT_TRUE(net::ParseIPLiteralToNumber(ip_str, &ip)); 209 EXPECT_TRUE(net::ParseIPLiteralToNumber(ip_str, &ip));
210 return net::IPEndPoint(ip, port); 210 return net::IPEndPoint(ip, port);
211 } 211 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698