diff options
author | charliea <charliea@chromium.org> | 2016-01-26 15:42:50 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-26 23:44:04 +0000 |
commit | c1b44047e693b68a9a441a1d9f464e3c9e16ed89 (patch) | |
tree | d25f3605d883097cc62663f1b3be40dda3a2d828 /base/trace_event | |
parent | 11eedafabb5a5ad43ec8caadacd4fd7de2f8c112 (diff) | |
download | chromium_src-c1b44047e693b68a9a441a1d9f464e3c9e16ed89.zip chromium_src-c1b44047e693b68a9a441a1d9f464e3c9e16ed89.tar.gz chromium_src-c1b44047e693b68a9a441a1d9f464e3c9e16ed89.tar.bz2 |
Adds a callback to TracingAgent::StartAgentTracing()
This allows us to use tracing agents that require more time to start.
The first use case of this will be the BattOr tracing agent, which
requires several round trips over USB before it can know whether
StartTracing was successful.
Review URL: https://codereview.chromium.org/1614063005
Cr-Commit-Position: refs/heads/master@{#371637}
Diffstat (limited to 'base/trace_event')
-rw-r--r-- | base/trace_event/tracing_agent.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/base/trace_event/tracing_agent.h b/base/trace_event/tracing_agent.h index 259ff07..77183b0 100644 --- a/base/trace_event/tracing_agent.h +++ b/base/trace_event/tracing_agent.h @@ -26,6 +26,8 @@ class TraceConfig; // system trace and PowerTracingAgent for BattOr power trace. class BASE_EXPORT TracingAgent { public: + using StartAgentTracingCallback = + base::Callback<void(const std::string& agent_name, bool success)>; // Passing a null or empty events_str_ptr indicates that no trace data is // available for the specified agent. using StopAgentTracingCallback = base::Callback<void( @@ -53,7 +55,8 @@ class BASE_EXPORT TracingAgent { virtual std::string GetTraceEventLabel() = 0; // Starts tracing on the tracing agent with the trace configuration. - virtual bool StartAgentTracing(const TraceConfig& trace_config) = 0; + virtual void StartAgentTracing(const TraceConfig& trace_config, + const StartAgentTracingCallback& callback) = 0; // Stops tracing on the tracing agent. The trace data will be passed back to // the TracingController via the callback. |