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

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

Issue 2400163003: arc: enable Android tracing in verified-boot mode (Closed)
Patch Set: Use struct instead of pair to save category data and fix lints 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..8161e563b94a5b103cf74a2ff483703bcb6399b1
--- /dev/null
+++ b/chrome/browser/chromeos/trace/sys_trace_agent.h
@@ -0,0 +1,53 @@
+// 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 <string>
+
+#include "base/macros.h"
+#include "base/task_runner.h"
+#include "base/trace_event/tracing_agent.h"
+
+namespace base {
Yusuke Sato 2016/10/12 05:58:12 spaces between 14 and 15, 16 and 17 are missing.
shunhsingou 2016/12/22 04:04:34 The forward declaration is now removed.
+template <typename Type>
+struct DefaultSingletonTraits;
+}
Yusuke Sato 2016/10/12 05:58:12 } // namespace base ?
shunhsingou 2016/12/22 04:04:34 Done.
+
+namespace chromeos {
+
+// A wrapper for controlling system tracing on Chrome OS.
+class SysTraceAgent : public base::trace_event::TracingAgent {
+ 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);
Yusuke Sato 2016/10/12 05:58:12 IWYU: #include for scoped_refptr<> missing? (IWYU
shunhsingou 2016/12/22 04:04:34 Done.
+
+ 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