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

Side by Side Diff: sky/tools/debugger/debugger.cc

Issue 945663003: Serve skydb on localhost instead of 0.0.0.0. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <algorithm> 5 #include <algorithm>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/profiler.h" 8 #include "base/debug/profiler.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 return; 44 return;
45 } 45 }
46 base::StringToUint(app->args()[1], &command_port_); 46 base::StringToUint(app->args()[1], &command_port_);
47 http_server::HttpServerFactoryPtr http_server_factory; 47 http_server::HttpServerFactoryPtr http_server_factory;
48 app->ConnectToService("mojo:http_server", &http_server_factory); 48 app->ConnectToService("mojo:http_server", &http_server_factory);
49 49
50 mojo::NetAddressPtr local_address(mojo::NetAddress::New()); 50 mojo::NetAddressPtr local_address(mojo::NetAddress::New());
51 local_address->family = mojo::NET_ADDRESS_FAMILY_IPV4; 51 local_address->family = mojo::NET_ADDRESS_FAMILY_IPV4;
52 local_address->ipv4 = mojo::NetAddressIPv4::New(); 52 local_address->ipv4 = mojo::NetAddressIPv4::New();
53 local_address->ipv4->addr.resize(4); 53 local_address->ipv4->addr.resize(4);
54 local_address->ipv4->addr[0] = 0; 54 local_address->ipv4->addr[0] = 127;
55 local_address->ipv4->addr[1] = 0; 55 local_address->ipv4->addr[1] = 0;
56 local_address->ipv4->addr[2] = 0; 56 local_address->ipv4->addr[2] = 0;
57 local_address->ipv4->addr[3] = 0; 57 local_address->ipv4->addr[3] = 1;
58 local_address->ipv4->port = command_port_; 58 local_address->ipv4->port = command_port_;
59 http_server_factory->CreateHttpServer(GetProxy(&http_server_).Pass(), 59 http_server_factory->CreateHttpServer(GetProxy(&http_server_).Pass(),
60 local_address.Pass()); 60 local_address.Pass());
61 61
62 http_server::HttpHandlerPtr handler_ptr; 62 http_server::HttpHandlerPtr handler_ptr;
63 handler_binding_.Bind(GetProxy(&handler_ptr).Pass()); 63 handler_binding_.Bind(GetProxy(&handler_ptr).Pass());
64 http_server_->SetHandler(".*", handler_ptr.Pass(), 64 http_server_->SetHandler(".*", handler_ptr.Pass(),
65 [](bool result) { DCHECK(result); }); 65 [](bool result) { DCHECK(result); });
66 } 66 }
67 67
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 }; 199 };
200 200
201 } // namespace debugger 201 } // namespace debugger
202 } // namespace sky 202 } // namespace sky
203 203
204 MojoResult MojoMain(MojoHandle shell_handle) { 204 MojoResult MojoMain(MojoHandle shell_handle) {
205 mojo::ApplicationRunnerChromium runner(new sky::debugger::SkyDebugger); 205 mojo::ApplicationRunnerChromium runner(new sky::debugger::SkyDebugger);
206 runner.set_message_loop_type(base::MessageLoop::TYPE_IO); 206 runner.set_message_loop_type(base::MessageLoop::TYPE_IO);
207 return runner.Run(shell_handle); 207 return runner.Run(shell_handle);
208 } 208 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698