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

Unified Diff: webrtc/base/socketaddress.cc

Issue 1535993002: remove deprecated StringToIP() methods from SocketAddress API (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/base/socketaddress.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/socketaddress.cc
diff --git a/webrtc/base/socketaddress.cc b/webrtc/base/socketaddress.cc
index 79ede801814421c76cb2c9fd68df7054ddfe2032..c5fd798cb11a2dc6db23e0cd2079b1036b96d0fa 100644
--- a/webrtc/base/socketaddress.cc
+++ b/webrtc/base/socketaddress.cc
@@ -307,39 +307,6 @@ size_t SocketAddress::ToSockAddrStorage(sockaddr_storage* addr) const {
return ToSockAddrStorageHelper(addr, ip_, port_, scope_id_);
}
-bool SocketAddress::StringToIP(const std::string& hostname, uint32_t* ip) {
- in_addr addr;
- if (rtc::inet_pton(AF_INET, hostname.c_str(), &addr) == 0)
- return false;
- *ip = NetworkToHost32(addr.s_addr);
- return true;
-}
-
-bool SocketAddress::StringToIP(const std::string& hostname, IPAddress* ip) {
- in_addr addr4;
- if (rtc::inet_pton(AF_INET, hostname.c_str(), &addr4) > 0) {
- if (ip) {
- *ip = IPAddress(addr4);
- }
- return true;
- }
-
- in6_addr addr6;
- if (rtc::inet_pton(AF_INET6, hostname.c_str(), &addr6) > 0) {
- if (ip) {
- *ip = IPAddress(addr6);
- }
- return true;
- }
- return false;
-}
-
-uint32_t SocketAddress::StringToIP(const std::string& hostname) {
- uint32_t ip = 0;
- StringToIP(hostname, &ip);
- return ip;
-}
-
bool SocketAddressFromSockAddrStorage(const sockaddr_storage& addr,
SocketAddress* out) {
if (!out) {
« no previous file with comments | « webrtc/base/socketaddress.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698