OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROMEOS_TRACE_ARC_TRACE_AGENT_H_ | |
6 #define CHROMEOS_TRACE_ARC_TRACE_AGENT_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "base/callback.h" | |
11 #include "base/trace_event/trace_event.h" | |
12 #include "base/trace_event/tracing_agent.h" | |
13 #include "chromeos/chromeos_export.h" | |
14 | |
15 namespace chromeos { | |
16 | |
17 // A wrapper for controlling tracing in ARC container. | |
18 class CHROMEOS_EXPORT ArcTraceAgent : public base::trace_event::TracingAgent { | |
19 public: | |
20 class Delegate { | |
21 public: | |
Yusuke Sato
2017/01/17 22:17:21
add
virtual ~Delegate() = default;
to force the d
Earl Ou
2017/01/18 09:13:21
Done.
| |
22 virtual void StartTracing( | |
23 const base::trace_event::TraceConfig& trace_config, | |
24 const base::Callback<void(bool)>& callback) = 0; | |
Luis Héctor Chávez
2017/01/17 19:20:32
nit: Can you add something like
using StartTracin
Earl Ou
2017/01/18 09:13:21
Done.
| |
25 | |
26 virtual void StopTracing( | |
27 const base::Callback<void(const std::string&)>& callback) = 0; | |
28 }; | |
29 | |
30 static ArcTraceAgent* GetInstance(); | |
31 | |
Yusuke Sato
2017/01/17 22:17:21
add
virtual ~ArcTraceAgent() = default;
?
Earl Ou
2017/01/18 09:13:21
Done.
| |
32 virtual void SetDelegate(Delegate* delegate) = 0; | |
Yusuke Sato
2017/01/17 22:17:21
Please add a function document. What happens if |d
Earl Ou
2017/01/18 09:13:21
Done.
| |
33 }; | |
34 | |
35 } // namespace chromeos | |
36 | |
37 #endif // CHROMEOS_TRACE_ARC_TRACE_AGENT_H_ | |
OLD | NEW |