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

Unified Diff: sky/tools/debugger/debugger.cc

Issue 953513002: http_server: accept full NetAddress in CreateHttpServer. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Address Ben's comments. Created 5 years, 10 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 | « sky/tools/debugger/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/tools/debugger/debugger.cc
diff --git a/sky/tools/debugger/debugger.cc b/sky/tools/debugger/debugger.cc
index 0bbc19c3d134ea2722de59b8d4b48d71d7b73510..cf44f9ae8b30aa478352fae522ad3e89eabbfebd 100644
--- a/sky/tools/debugger/debugger.cc
+++ b/sky/tools/debugger/debugger.cc
@@ -14,6 +14,7 @@
#include "mojo/public/cpp/application/application_delegate.h"
#include "mojo/public/cpp/application/application_impl.h"
#include "mojo/public/cpp/bindings/binding.h"
+#include "mojo/services/network/public/interfaces/net_address.mojom.h"
#include "mojo/services/window_manager/public/interfaces/window_manager.mojom.h"
#include "services/http_server/public/http_server.mojom.h"
#include "services/http_server/public/http_server_factory.mojom.h"
@@ -45,8 +46,18 @@ class SkyDebugger : public mojo::ApplicationDelegate,
base::StringToUint(app->args()[1], &command_port_);
http_server::HttpServerFactoryPtr http_server_factory;
app->ConnectToService("mojo:http_server", &http_server_factory);
+
+ mojo::NetAddressPtr local_address(mojo::NetAddress::New());
+ local_address->family = mojo::NET_ADDRESS_FAMILY_IPV4;
+ local_address->ipv4 = mojo::NetAddressIPv4::New();
+ local_address->ipv4->addr.resize(4);
+ local_address->ipv4->addr[0] = 0;
+ local_address->ipv4->addr[1] = 0;
+ local_address->ipv4->addr[2] = 0;
+ local_address->ipv4->addr[3] = 0;
+ local_address->ipv4->port = command_port_;
http_server_factory->CreateHttpServer(GetProxy(&http_server_).Pass(),
- command_port_);
+ local_address.Pass());
http_server::HttpHandlerPtr handler_ptr;
handler_binding_.Bind(GetProxy(&handler_ptr).Pass());
« no previous file with comments | « sky/tools/debugger/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698