Index: content/browser/tracing/power_tracing_agent.cc |
diff --git a/content/browser/tracing/power_tracing_agent.cc b/content/browser/tracing/power_tracing_agent.cc |
index 409240c4fe7f014f15ae81fb8303f7057a8f89f8..75e4783ef5b9f4dc479b4a97c0d568f69b7ffe35 100644 |
--- a/content/browser/tracing/power_tracing_agent.cc |
+++ b/content/browser/tracing/power_tracing_agent.cc |
@@ -11,13 +11,23 @@ |
namespace content { |
+// static |
+PowerTracingAgent* PowerTracingAgent::GetInstance() { |
+ return base::Singleton<PowerTracingAgent>::get(); |
+} |
+ |
PowerTracingAgent::PowerTracingAgent() : is_tracing_(false) { |
battor_trace_provider_.reset(new BattorPowerTraceProvider()); |
} |
PowerTracingAgent::~PowerTracingAgent() {} |
-bool PowerTracingAgent::StartTracing() { |
+std::string PowerTracingAgent::GetTracingAgentName() { |
+ return kPowerTracingAgentName; |
+} |
+ |
+bool PowerTracingAgent::StartAgentTracing( |
+ const base::trace_event::TraceConfig& trace_config) { |
// Tracing session already in progress. |
if (is_tracing_) |
return false; |
@@ -29,13 +39,14 @@ bool PowerTracingAgent::StartTracing() { |
return is_tracing_; |
} |
-void PowerTracingAgent::StopTracing(const OutputCallback& callback) { |
+void PowerTracingAgent::StopAgentTracing( |
+ const StopAgentTracingCallback& callback) { |
// No tracing session in progress. |
if (!is_tracing_) |
return; |
// Stop tracing & collect logs. |
- OutputCallback on_stop_power_tracing_done_callback = base::Bind( |
+ StopAgentTracingCallback on_stop_power_tracing_done_callback = base::Bind( |
&PowerTracingAgent::OnStopTracingDone, base::Unretained(this), callback); |
BrowserThread::PostTask( |
BrowserThread::UI, FROM_HERE, |
@@ -44,19 +55,15 @@ void PowerTracingAgent::StopTracing(const OutputCallback& callback) { |
} |
void PowerTracingAgent::OnStopTracingDone( |
- const OutputCallback& callback, |
+ const StopAgentTracingCallback& callback, |
const scoped_refptr<base::RefCountedString>& result) { |
is_tracing_ = false; |
// Pass the serialized events. |
callback.Run(result); |
} |
-// static |
-PowerTracingAgent* PowerTracingAgent::GetInstance() { |
- return base::Singleton<PowerTracingAgent>::get(); |
-} |
- |
-void PowerTracingAgent::FlushOnThread(const OutputCallback& callback) { |
+void PowerTracingAgent::FlushOnThread( |
+ const StopAgentTracingCallback& callback) { |
// Pass the result to the UI Thread. |
// TODO(prabhur) StopTracing & GetLog need to be called on a |
@@ -70,4 +77,17 @@ void PowerTracingAgent::FlushOnThread(const OutputCallback& callback) { |
base::Bind(callback, result)); |
} |
+bool PowerTracingAgent::SupportsExplicitClockSync() { |
+ return false; |
+} |
+ |
+void PowerTracingAgent::RecordClockSyncMarker( |
+ scoped_ptr<base::DictionaryValue> marker) { |
+ DCHECK(SupportsExplicitClockSync()); |
+} |
+ |
+void PowerTracingAgent::IssueClockSyncMarker() { |
+ DCHECK(SupportsExplicitClockSync()); |
+} |
+ |
} // namespace content |