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

Unified Diff: chromeos/dbus/debug_daemon_client.cc

Issue 1614063005: Adds a callback to TracingAgent::StartAgentTracing() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « base/trace_event/tracing_agent.h ('k') | chromeos/dbus/fake_debug_daemon_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/debug_daemon_client.cc
diff --git a/chromeos/dbus/debug_daemon_client.cc b/chromeos/dbus/debug_daemon_client.cc
index 5358c9419e3002796764837db46616d97212b2a6..4af98485a00f8324d32f7c4f31f804296166931c 100644
--- a/chromeos/dbus/debug_daemon_client.cc
+++ b/chromeos/dbus/debug_daemon_client.cc
@@ -20,6 +20,7 @@
#include "base/posix/eintr_wrapper.h"
#include "base/strings/string_util.h"
#include "base/task_runner_util.h"
+#include "base/thread_task_runner_handle.h"
#include "chromeos/dbus/pipe_reader.h"
#include "dbus/bus.h"
#include "dbus/message.h"
@@ -206,8 +207,8 @@ class DebugDaemonClientImpl : public DebugDaemonClient {
std::string GetTraceEventLabel() override { return kCrOSTraceLabel; }
- bool StartAgentTracing(
- const base::trace_event::TraceConfig& trace_config) override {
+ void StartAgentTracing(const base::trace_event::TraceConfig& trace_config,
+ const StartAgentTracingCallback& callback) override {
dbus::MethodCall method_call(
debugd::kDebugdInterface,
debugd::kSystraceStart);
@@ -220,7 +221,10 @@ class DebugDaemonClientImpl : public DebugDaemonClient {
dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
base::Bind(&DebugDaemonClientImpl::OnStartMethod,
weak_ptr_factory_.GetWeakPtr()));
- return true;
+
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE,
+ base::Bind(callback, GetTracingAgentName(), true /* success */));
}
void StopAgentTracing(const StopAgentTracingCallback& callback) override {
« no previous file with comments | « base/trace_event/tracing_agent.h ('k') | chromeos/dbus/fake_debug_daemon_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698