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

Unified Diff: extensions/browser/api/socket/socket.cc

Issue 1837713002: Migrate extensions/* to net::IPAddress. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added a DCHECK Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/browser/api/cast_channel/logger.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/socket/socket.cc
diff --git a/extensions/browser/api/socket/socket.cc b/extensions/browser/api/socket/socket.cc
index a47f255118f292153fd42eb238001964b4bbec95..77de30190a0f175909b0eb08600246772067bc03 100644
--- a/extensions/browser/api/socket/socket.cc
+++ b/extensions/browser/api/socket/socket.cc
@@ -9,6 +9,7 @@
#include "extensions/browser/api/api_resource_manager.h"
#include "net/base/address_list.h"
#include "net/base/io_buffer.h"
+#include "net/base/ip_address.h"
#include "net/base/ip_endpoint.h"
#include "net/base/net_errors.h"
#include "net/socket/socket.h"
@@ -106,11 +107,11 @@ bool Socket::StringAndPortToIPEndPoint(const std::string& ip_address_str,
uint16_t port,
net::IPEndPoint* ip_end_point) {
DCHECK(ip_end_point);
- net::IPAddressNumber ip_number;
- if (!net::ParseIPLiteralToNumber(ip_address_str, &ip_number))
+ net::IPAddress ip_address;
+ if (!ip_address.AssignFromIPLiteral(ip_address_str))
return false;
- *ip_end_point = net::IPEndPoint(ip_number, port);
+ *ip_end_point = net::IPEndPoint(ip_address, port);
return true;
}
« no previous file with comments | « extensions/browser/api/cast_channel/logger.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698