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

Unified Diff: remoting/host/daemon_process.cc

Issue 2881673002: Avoid heap allocations in IPAddress (Closed)
Patch Set: New constructor Created 3 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 | « ppapi/shared_impl/private/net_address_private_impl.cc ('k') | remoting/host/ipc_host_event_logger.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/daemon_process.cc
diff --git a/remoting/host/daemon_process.cc b/remoting/host/daemon_process.cc
index 0cf6a8143391d362a1ab402dd1acd25861e5f3d2..7e3142da453b9851d676f8eea3f9f72b192f4b40 100644
--- a/remoting/host/daemon_process.cc
+++ b/remoting/host/daemon_process.cc
@@ -332,11 +332,11 @@ void DaemonProcess::OnClientRouteChange(const std::string& jid,
protocol::TransportRoute parsed_route;
parsed_route.type = route.type;
- net::IPAddress remote_ip(route.remote_ip);
+ net::IPAddress remote_ip(route.remote_ip.data(), route.remote_ip.size());
CHECK(remote_ip.empty() || remote_ip.IsValid());
parsed_route.remote_address = net::IPEndPoint(remote_ip, route.remote_port);
- net::IPAddress local_ip(route.local_ip);
+ net::IPAddress local_ip(route.local_ip.data(), route.local_ip.size());
CHECK(local_ip.empty() || local_ip.IsValid());
parsed_route.local_address = net::IPEndPoint(local_ip, route.local_port);
« no previous file with comments | « ppapi/shared_impl/private/net_address_private_impl.cc ('k') | remoting/host/ipc_host_event_logger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698