| 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 {
|
| +template <typename Type>
|
| +struct DefaultSingletonTraits;
|
| +}
|
| +
|
| +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);
|
| +
|
| + 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_
|
|
|