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

Unified Diff: tools/battor_agent/battor_agent.h

Issue 1407033008: Makes the BattOrAgent asynchronous (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added //base dependency to bin Created 5 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
« no previous file with comments | « tools/battor_agent/BUILD.gn ('k') | tools/battor_agent/battor_agent.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..7b49f6740aafb692da2730ffed568988886ccf5c 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 write the trace output to
+ // the specified location and calls the callback when complete.
+ void StopTracing(std::string* trace_output, const base::Closure& callback);
- // Tells the BattOr to record a clock sync marker in its own trace log.
- void RecordClockSyncMarker(const std::string& marker);
+ // Tells the BattOr to record a clock sync marker in its own trace
+ // log and calls the callback when complete.
+ void RecordClockSyncMarker(const std::string& marker,
+ const base::Closure& callback);
- // 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
« no previous file with comments | « tools/battor_agent/BUILD.gn ('k') | tools/battor_agent/battor_agent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698