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

Unified Diff: chromeos/trace/arc_trace_agent.h

Issue 2400163003: arc: enable Android tracing in verified-boot mode (Closed)
Patch Set: Fix some nits Created 3 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
Index: chromeos/trace/arc_trace_agent.h
diff --git a/chromeos/trace/arc_trace_agent.h b/chromeos/trace/arc_trace_agent.h
new file mode 100644
index 0000000000000000000000000000000000000000..844b7190f81c3ed29a59f5d1a4d7b5db2ea2a883
--- /dev/null
+++ b/chromeos/trace/arc_trace_agent.h
@@ -0,0 +1,37 @@
+// 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_TRACE_ARC_TRACE_AGENT_H_
+#define CHROMEOS_TRACE_ARC_TRACE_AGENT_H_
+
+#include <string>
+
+#include "base/callback.h"
+#include "base/trace_event/trace_event.h"
+#include "base/trace_event/tracing_agent.h"
+#include "chromeos/chromeos_export.h"
+
+namespace chromeos {
+
+// A wrapper for controlling tracing in ARC container.
+class CHROMEOS_EXPORT ArcTraceAgent : public base::trace_event::TracingAgent {
+ public:
+ class Delegate {
+ public:
Yusuke Sato 2017/01/17 22:17:21 add virtual ~Delegate() = default; to force the d
Earl Ou 2017/01/18 09:13:21 Done.
+ virtual void StartTracing(
+ const base::trace_event::TraceConfig& trace_config,
+ const base::Callback<void(bool)>& callback) = 0;
Luis Héctor Chávez 2017/01/17 19:20:32 nit: Can you add something like using StartTracin
Earl Ou 2017/01/18 09:13:21 Done.
+
+ virtual void StopTracing(
+ const base::Callback<void(const std::string&)>& callback) = 0;
+ };
+
+ static ArcTraceAgent* GetInstance();
+
Yusuke Sato 2017/01/17 22:17:21 add virtual ~ArcTraceAgent() = default; ?
Earl Ou 2017/01/18 09:13:21 Done.
+ virtual void SetDelegate(Delegate* delegate) = 0;
Yusuke Sato 2017/01/17 22:17:21 Please add a function document. What happens if |d
Earl Ou 2017/01/18 09:13:21 Done.
+};
+
+} // namespace chromeos
+
+#endif // CHROMEOS_TRACE_ARC_TRACE_AGENT_H_

Powered by Google App Engine
This is Rietveld 408576698