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_ |