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

Unified Diff: chrome/browser/extensions/extension_web_socket_proxy_private_api.cc

Issue 10309002: Reimplements net::AddressList without struct addrinfo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: get_canonical_name -> canonical_name. iterator to indexing Created 8 years, 7 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 | « chrome/browser/extensions/api/socket/socket.cc ('k') | chrome/browser/net/network_stats.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_web_socket_proxy_private_api.cc
diff --git a/chrome/browser/extensions/extension_web_socket_proxy_private_api.cc b/chrome/browser/extensions/extension_web_socket_proxy_private_api.cc
index be377c2c3177e2e3212830eb02c6ecbd4f6608c8..5532d3da382c327fccffef23e50fc8133f0b96fb 100644
--- a/chrome/browser/extensions/extension_web_socket_proxy_private_api.cc
+++ b/chrome/browser/extensions/extension_web_socket_proxy_private_api.cc
@@ -128,8 +128,8 @@ bool WebSocketProxyPrivate::RunImpl() {
void WebSocketProxyPrivate::OnHostResolution(int result) {
#if defined(OS_CHROMEOS)
- if (result == 0 && addr_.head() != NULL) {
- std::string ip = net::NetAddressToString(addr_.head());
+ if (result == 0 && !addr_.empty()) {
+ std::string ip = addr_.front().ToStringWithoutPort();
if (!ip.empty() && ip.find(':') != std::string::npos && ip[0] != '[')
ip = '[' + ip + ']';
map_["addr"] = ip;
« no previous file with comments | « chrome/browser/extensions/api/socket/socket.cc ('k') | chrome/browser/net/network_stats.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698