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

Unified Diff: chrome/browser/chromeos/trace/sys_trace_agent.h

Issue 2400163003: arc: enable Android tracing in verified-boot mode (Closed)
Patch Set: arc: enable Android framework tracing in chrome://tracing Created 4 years, 2 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: chrome/browser/chromeos/trace/sys_trace_agent.h
diff --git a/chrome/browser/chromeos/trace/sys_trace_agent.h b/chrome/browser/chromeos/trace/sys_trace_agent.h
new file mode 100644
index 0000000000000000000000000000000000000000..a2c0883b38c2ea90ce9b2c15d9f6cdb25e6b5d6a
--- /dev/null
+++ b/chrome/browser/chromeos/trace/sys_trace_agent.h
@@ -0,0 +1,52 @@
+// 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 CHROME_BROWSER_CHROMEOS_TRACE_SYS_TRACE_AGENT_H_
+#define CHROME_BROWSER_CHROMEOS_TRACE_SYS_TRACE_AGENT_H_
+
+#include "base/macros.h"
+#include "base/task_runner.h"
+#include "base/trace_event/tracing_agent.h"
+
+namespace base {
+template <typename Type>
+struct DefaultSingletonTraits;
+}
+
+namespace chromeos {
+
+// A wrapper for controlling system tracing on Chrome OS.
+class SysTraceAgent : public base::trace_event::TracingAgent {
+
Luis Héctor Chávez 2016/10/11 03:38:49 Can you run `git cl format` and `git cl lint`?
shunhsingou 2016/10/11 07:22:05 Done.
+ public:
+ // Gets the Singleton of this class.
+ static SysTraceAgent* GetInstance();
+
+ // Overrides TracingAgent functions.
+ std::string GetTracingAgentName() override;
+
+ std::string GetTraceEventLabel() override;
+
+ void StopAgentTracing(const StopAgentTracingCallback& callback) override;
+
+ void StartAgentTracing(const base::trace_event::TraceConfig& trace_config,
+ const StartAgentTracingCallback& callback) override;
+
+ void SetStopAgentTracingTaskRunner(
+ scoped_refptr<base::TaskRunner> task_runner);
+
+ private:
+ // This allows constructor and destructor to be private and usable only
+ // by the Singleton class.
+ friend struct base::DefaultSingletonTraits<SysTraceAgent>;
+
+ SysTraceAgent();
+ ~SysTraceAgent() override;
+
+ DISALLOW_COPY_AND_ASSIGN(SysTraceAgent);
+};
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_TRACE_SYS_TRACE_AGENT_H_

Powered by Google App Engine
This is Rietveld 408576698