Chromium Code Reviews| Index: tools/battor_agent/battor_agent.h |
| diff --git a/tools/battor_agent/battor_agent.h b/tools/battor_agent/battor_agent.h |
| index ced696e0bd2a4772c80a1ab4ee574dfa7ce8c856..fbbad048bdb324d4a749c8df38215f1eb7d5f236 100644 |
| --- a/tools/battor_agent/battor_agent.h |
| +++ b/tools/battor_agent/battor_agent.h |
| @@ -4,7 +4,9 @@ |
| #include <string> |
| +#include "base/callback_forward.h" |
| #include "base/macros.h" |
| +#include "base/memory/scoped_ptr.h" |
| namespace battor { |
| @@ -13,17 +15,20 @@ class BattOrAgent { |
| explicit BattOrAgent(const std::string& path); |
| virtual ~BattOrAgent(); |
| - // Tells the BattOr to start tracing. |
| + // Tells the BattOr (using a best-effort signal) to start tracing. |
| void StartTracing(); |
| - // Tells the BattOr to stop tracing and returns the trace contents. |
| - void StopTracing(std::string* out_trace); |
| + // Tells the BattOr to stop tracing and calls the callback when the |
| + // trace output is available. |
| + void StopTracing( |
| + const base::Callback<void(scoped_ptr<std::string>)>& callback); |
| - // Tells the BattOr to record a clock sync marker in its own trace log. |
| + // Tells the BattOr (using a best-effort signal) to record a clock |
| + // sync marker in its own trace log. |
| void RecordClockSyncMarker(const std::string& marker); |
|
Zhen Wang
2015/10/29 19:40:22
I think we still need asynchronous call for this b
|
| - // Tells the BattOr to issue clock sync markers to all other tracing |
| - // agents that it's connected to. |
| + // Tells the BattOr (using a best-effort signal) to issue clock sync |
| + // markers to all other tracing agents that it's connected to. |
| void IssueClockSyncMarker(); |
| // Returns whether the BattOr is able to record clock sync markers |