Index: net/udp/udp_socket_unittest.cc |
diff --git a/net/udp/udp_socket_unittest.cc b/net/udp/udp_socket_unittest.cc |
index 57a8f5b79ad6e772f326645f463bb25b7e717c06..0a0a855425cbb73b2afe16ea7ac211501984d2ea 100644 |
--- a/net/udp/udp_socket_unittest.cc |
+++ b/net/udp/udp_socket_unittest.cc |
@@ -53,7 +53,7 @@ class UDPSocketTest : public PlatformTest { |
// If |address| is specified, then it is used for the destination |
// to send to. Otherwise, will send to the last socket this server |
// received from. |
- int SendToSocket(UDPServerSocket* socket, std::string msg) { |
+ int SendToSocket(UDPServerSocket* socket, const std::string& msg) { |
return SendToSocket(socket, msg, recv_from_address_); |
} |
@@ -94,7 +94,7 @@ class UDPSocketTest : public PlatformTest { |
// Loop until |msg| has been written to the socket or until an |
// error occurs. |
- int WriteSocket(UDPClientSocket* socket, std::string msg) { |
+ int WriteSocket(UDPClientSocket* socket, const std::string& msg) { |
TestCompletionCallback callback; |
int length = msg.length(); |
@@ -116,12 +116,15 @@ class UDPSocketTest : public PlatformTest { |
return bytes_sent; |
} |
- void WriteSocketIgnoreResult(UDPClientSocket* socket, std::string msg) { |
+ void WriteSocketIgnoreResult(UDPClientSocket* socket, |
+ const std::string& msg) { |
WriteSocket(socket, msg); |
} |
// Creates an address from ip address and port and writes it to |*address|. |
- void CreateUDPAddress(std::string ip_str, uint16 port, IPEndPoint* address) { |
+ void CreateUDPAddress(const std::string& ip_str, |
+ uint16 port, |
+ IPEndPoint* address) { |
IPAddressNumber ip_number; |
bool rv = ParseIPLiteralToNumber(ip_str, &ip_number); |
if (!rv) |