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

Unified Diff: services/debugger/debugger.cc

Issue 1151573010: Pull Sky debugger up to services/debugger. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 | « services/debugger/BUILD.gn ('k') | services/debugger/trace_collector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/debugger/debugger.cc
diff --git a/sky/tools/debugger/debugger.cc b/services/debugger/debugger.cc
similarity index 91%
rename from sky/tools/debugger/debugger.cc
rename to services/debugger/debugger.cc
index 04a92474a3e724d75be0e5d4339eedd726b7a23d..5d1f63038df94226aa76b10851818f167814ca2b 100644
--- a/sky/tools/debugger/debugger.cc
+++ b/services/debugger/debugger.cc
@@ -19,17 +19,21 @@
#include "mojo/services/http_server/public/interfaces/http_server_factory.mojom.h"
#include "mojo/services/network/public/interfaces/net_address.mojom.h"
#include "mojo/services/window_manager/public/interfaces/window_manager.mojom.h"
+#include "services/debugger/trace_collector.h"
#include "services/tracing/tracing.mojom.h"
-#include "sky/tools/debugger/trace_collector.h"
-namespace sky {
+// Debugger is a Mojo application that exposes an http server and talks to other
+// mojo apps in response to url requests received by the server. Supported
+// actions include tracing and profiling, allowing to interactively inspect how
+// the shell is performing.
+
namespace debugger {
-class SkyDebugger : public mojo::ApplicationDelegate,
+class Debugger : public mojo::ApplicationDelegate,
public http_server::HttpHandler {
public:
- SkyDebugger() : is_tracing_(false), app_(nullptr), handler_binding_(this) {}
- ~SkyDebugger() override {}
+ Debugger() : is_tracing_(false), app_(nullptr), handler_binding_(this) {}
+ ~Debugger() override {}
private:
// mojo::ApplicationDelegate:
@@ -157,7 +161,7 @@ class SkyDebugger : public mojo::ApplicationDelegate,
is_tracing_ = false;
tracing_->StopAndFlush();
- trace_collector_->GetTrace(base::Bind(&SkyDebugger::OnTraceAvailable,
+ trace_collector_->GetTrace(base::Bind(&Debugger::OnTraceAvailable,
base::Unretained(this), callback));
}
@@ -198,14 +202,13 @@ class SkyDebugger : public mojo::ApplicationDelegate,
scoped_ptr<TraceCollector> trace_collector_;
- DISALLOW_COPY_AND_ASSIGN(SkyDebugger);
+ DISALLOW_COPY_AND_ASSIGN(Debugger);
};
} // namespace debugger
-} // namespace sky
MojoResult MojoMain(MojoHandle application_request) {
- mojo::ApplicationRunnerChromium runner(new sky::debugger::SkyDebugger);
+ mojo::ApplicationRunnerChromium runner(new debugger::Debugger);
runner.set_message_loop_type(base::MessageLoop::TYPE_IO);
return runner.Run(application_request);
}
« no previous file with comments | « services/debugger/BUILD.gn ('k') | services/debugger/trace_collector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698