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

Side by Side Diff: chromeos/trace/arc_trace_agent.h

Issue 2400163003: arc: enable Android tracing in verified-boot mode (Closed)
Patch Set: Fix some nits Created 3 years, 10 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 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/files/scoped_file.h"
12 #include "base/trace_event/trace_event.h"
13 #include "base/trace_event/tracing_agent.h"
14 #include "chromeos/chromeos_export.h"
15
16 namespace chromeos {
17
18 // A wrapper for controlling tracing in ARC container.
19 class CHROMEOS_EXPORT ArcTraceAgent : public base::trace_event::TracingAgent {
20 public:
21 class Delegate {
22 public:
23 using StartTracingCallback = base::Callback<void(bool)>;
24 using StopTracingCallback = base::Callback<void(const std::string&)>;
25
26 virtual ~Delegate() = default;
27
28 virtual void StartTracing(
29 const base::trace_event::TraceConfig& trace_config,
30 const StartTracingCallback& callback) = 0;
31
32 virtual void StopTracing(const StopTracingCallback& callback) = 0;
33 };
34
35 virtual ~ArcTraceAgent() = default;
36
37 static ArcTraceAgent* GetInstance();
38
39 // Sets Delegate instance, which should implement the communication
40 // using ARC bridge. If set to nullptr, calling of Start/StopAgentTracing
41 // does nothing.
42 virtual void SetDelegate(Delegate* delegate) = 0;
43 };
44
45 } // namespace chromeos
46
47 #endif // CHROMEOS_TRACE_ARC_TRACE_AGENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698