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

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: Makes some commands best-effort 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 | « no previous file | tools/battor_agent/battor_agent.cc » ('j') | tools/battor_agent/battor_agent.cc » ('J')
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..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
« no previous file with comments | « no previous file | tools/battor_agent/battor_agent.cc » ('j') | tools/battor_agent/battor_agent.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698