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

Unified Diff: chromeos/dbus/arc_trace_agent.h

Issue 2400163003: arc: enable Android tracing in verified-boot mode (Closed)
Patch Set: add FakeArcTraceAgent for linux and test Created 4 years 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
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_

Powered by Google App Engine
This is Rietveld 408576698