Chromium Code Reviews| Index: chromeos/dbus/arc_trace_agent.h |
| diff --git a/chromeos/dbus/arc_trace_agent.h b/chromeos/dbus/arc_trace_agent.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..96900d4df5639fb5aa97dadde7dfc1f4f0349357 |
| --- /dev/null |
| +++ b/chromeos/dbus/arc_trace_agent.h |
| @@ -0,0 +1,51 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROMEOS_DBUS_ARC_TRACE_AGENT_H_ |
| +#define CHROMEOS_DBUS_ARC_TRACE_AGENT_H_ |
| + |
| +#include <memory> |
| + |
| +#include "base/macros.h" |
| +#include "base/task_runner.h" |
| +#include "base/trace_event/trace_event.h" |
| +#include "base/trace_event/tracing_agent.h" |
| +#include "chromeos/chromeos_export.h" |
| +#include "chromeos/dbus/dbus_client.h" |
| + |
| +namespace chromeos { |
| + |
| +// ArcTraceAgent is used to commuicate with ArcTraceService and debugd to |
| +// trigger tracing and collect trace logs. |
| +class CHROMEOS_EXPORT ArcTraceAgent : public base::trace_event::TracingAgent, |
| + public DBusClient { |
| + public: |
| + class Delegate { |
| + public: |
| + virtual void StartTracing( |
| + const base::trace_event::TraceConfig& trace_config) = 0; |
| + |
| + virtual void StopTracing() = 0; |
| + }; |
| + |
| + ~ArcTraceAgent() override = default; |
| + |
| + virtual void SetDelegate(Delegate* delegate) = 0; |
| + |
| + virtual void SetStopAgentTracingTaskRunner( |
| + scoped_refptr<base::TaskRunner> task_runner) = 0; |
| + |
| + static ArcTraceAgent* Create(); |
| + |
| + protected: |
| + // Create() should be used instead. |
| + ArcTraceAgent() {} |
|
Luis Héctor Chávez
2016/12/28 17:21:58
nit: ArcTraceAgent();
and then
ArcTraceAgent() =
shunhsingou
2016/12/29 09:40:29
Done.
|
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(ArcTraceAgent); |
| +}; |
| + |
| +} // namespace chromeos |
| + |
| +#endif // CHROMEOS_DBUS_ARC_TRACE_AGENT_H_ |