Index: content/browser/tracing/power_tracing_agent.h |
diff --git a/content/browser/tracing/power_tracing_agent.h b/content/browser/tracing/power_tracing_agent.h |
index 3c897d6753df931394354bfeca13814d668feac0..4579b605ad642866a9f503293de06cc8906ab413 100644 |
--- a/content/browser/tracing/power_tracing_agent.h |
+++ b/content/browser/tracing/power_tracing_agent.h |
@@ -7,6 +7,7 @@ |
#include "base/memory/ref_counted_memory.h" |
#include "base/threading/thread.h" |
+#include "base/trace_event/tracing_agent.h" |
namespace base { |
template <typename Type> |
@@ -17,17 +18,22 @@ namespace content { |
class BattorPowerTraceProvider; |
-class PowerTracingAgent { |
+class PowerTracingAgent : public base::trace_event::TracingAgent { |
public: |
- typedef base::Callback<void(const scoped_refptr<base::RefCountedString>&)> |
- OutputCallback; |
- |
- bool StartTracing(); |
- void StopTracing(const OutputCallback& callback); |
- |
// Retrieve the singleton instance. |
static PowerTracingAgent* GetInstance(); |
+ std::string GetTracingAgentName() override; |
Primiano Tucci (use gerrit)
2015/12/01 11:42:43
Typically you want to add a comment like:
// base
Zhen Wang
2015/12/01 18:02:53
Done.
|
+ std::string GetTraceEventLabel() override; |
+ |
+ bool StartAgentTracing( |
+ const base::trace_event::TraceConfig& trace_config) override; |
+ void StopAgentTracing(const StopAgentTracingCallback& callback) override; |
+ |
+ bool SupportsExplicitClockSync() override; |
+ void RecordClockSyncMarker(scoped_ptr<base::DictionaryValue> marker) override; |
+ void IssueClockSyncMarker() override; |
+ |
private: |
// This allows constructor and destructor to be private and usable only |
// by the Singleton class. |
@@ -35,12 +41,12 @@ class PowerTracingAgent { |
// Constructor. |
PowerTracingAgent(); |
- virtual ~PowerTracingAgent(); |
+ ~PowerTracingAgent() override; |
- void OnStopTracingDone(const OutputCallback& callback, |
+ void OnStopTracingDone(const StopAgentTracingCallback& callback, |
const scoped_refptr<base::RefCountedString>& result); |
- void FlushOnThread(const OutputCallback& callback); |
+ void FlushOnThread(const StopAgentTracingCallback& callback); |
scoped_ptr<BattorPowerTraceProvider> battor_trace_provider_; |
bool is_tracing_; |