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_DBUS_ARC_TRACE_AGENT_H_ | |
6 #define CHROMEOS_DBUS_ARC_TRACE_AGENT_H_ | |
7 | |
8 #include <memory> | |
9 | |
10 #include "base/macros.h" | |
11 #include "base/task_runner.h" | |
12 #include "base/trace_event/trace_event.h" | |
13 #include "base/trace_event/tracing_agent.h" | |
14 #include "chromeos/chromeos_export.h" | |
15 #include "chromeos/dbus/dbus_client.h" | |
16 | |
17 namespace chromeos { | |
18 | |
19 // ArcTraceAgent is used to commuicate with ArcTraceService and debugd to | |
20 // trigger tracing and collect trace logs. | |
21 class CHROMEOS_EXPORT ArcTraceAgent : public base::trace_event::TracingAgent, | |
22 public DBusClient { | |
23 public: | |
24 class Delegate { | |
25 public: | |
26 virtual void StartTracing( | |
27 const base::trace_event::TraceConfig& trace_config) = 0; | |
28 | |
29 virtual void StopTracing() = 0; | |
30 }; | |
31 | |
32 ~ArcTraceAgent() override; | |
33 | |
34 virtual void SetDelegate(Delegate* delegate) = 0; | |
35 | |
36 virtual void SetStopAgentTracingTaskRunner( | |
37 scoped_refptr<base::TaskRunner> task_runner) = 0; | |
Yusuke Sato
2017/01/04 23:55:47
#include base/memory/ref_counted.h ?
Earl Ou
2017/01/16 14:05:45
This method is removed from here.
| |
38 | |
39 static ArcTraceAgent* Create(); | |
Yusuke Sato
2017/01/04 23:55:47
What about returning a unique_ptr? Since the objec
Earl Ou
2017/01/16 14:05:43
I use singleton.h here now
| |
40 | |
41 protected: | |
42 // Create() should be used instead. | |
43 ArcTraceAgent(); | |
44 | |
45 private: | |
46 DISALLOW_COPY_AND_ASSIGN(ArcTraceAgent); | |
47 }; | |
48 | |
49 } // namespace chromeos | |
50 | |
51 #endif // CHROMEOS_DBUS_ARC_TRACE_AGENT_H_ | |
OLD | NEW |