OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_ |
6 #define CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_ | 6 #define CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/platform_file.h" | 9 #include "base/platform_file.h" |
10 #include "base/memory/ref_counted_memory.h" | 10 #include "base/memory/ref_counted_memory.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 | 88 |
89 // Called once GetPerfData() is complete only if the the data is successfully | 89 // Called once GetPerfData() is complete only if the the data is successfully |
90 // obtained from debugd. | 90 // obtained from debugd. |
91 typedef base::Callback<void(const std::vector<uint8>& data)> | 91 typedef base::Callback<void(const std::vector<uint8>& data)> |
92 GetPerfDataCallback; | 92 GetPerfDataCallback; |
93 | 93 |
94 // Runs perf for |duration| seconds and returns data collected. | 94 // Runs perf for |duration| seconds and returns data collected. |
95 virtual void GetPerfData(uint32_t duration, | 95 virtual void GetPerfData(uint32_t duration, |
96 const GetPerfDataCallback& callback) = 0; | 96 const GetPerfDataCallback& callback) = 0; |
97 | 97 |
98 // Callback type for GetAllLogs() or GetUserLogFiles(). | 98 // Callback type for GetScrubbedLogs(), GetAllLogs() or GetUserLogFiles(). |
99 typedef base::Callback<void(bool succeeded, | 99 typedef base::Callback<void(bool succeeded, |
100 const std::map<std::string, std::string>& logs)> | 100 const std::map<std::string, std::string>& logs)> |
101 GetLogsCallback; | 101 GetLogsCallback; |
102 | 102 |
| 103 // Gets scrubbed logs from debugd. |
| 104 virtual void GetScrubbedLogs(const GetLogsCallback& callback) = 0; |
| 105 |
103 // Gets all logs collected by debugd. | 106 // Gets all logs collected by debugd. |
104 virtual void GetAllLogs(const GetLogsCallback& callback) = 0; | 107 virtual void GetAllLogs(const GetLogsCallback& callback) = 0; |
105 | 108 |
106 // Gets list of user log files that must be read by Chrome. | 109 // Gets list of user log files that must be read by Chrome. |
107 virtual void GetUserLogFiles(const GetLogsCallback& callback) = 0; | 110 virtual void GetUserLogFiles(const GetLogsCallback& callback) = 0; |
108 | 111 |
109 // Requests to start system/kernel tracing. | 112 // Requests to start system/kernel tracing. |
110 virtual void StartSystemTracing() = 0; | 113 virtual void StartSystemTracing() = 0; |
111 | 114 |
112 // Called once RequestStopSystemTracing() is complete. Takes one parameter: | 115 // Called once RequestStopSystemTracing() is complete. Takes one parameter: |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 // Create() should be used instead. | 152 // Create() should be used instead. |
150 DebugDaemonClient(); | 153 DebugDaemonClient(); |
151 | 154 |
152 private: | 155 private: |
153 DISALLOW_COPY_AND_ASSIGN(DebugDaemonClient); | 156 DISALLOW_COPY_AND_ASSIGN(DebugDaemonClient); |
154 }; | 157 }; |
155 | 158 |
156 } // namespace chromeos | 159 } // namespace chromeos |
157 | 160 |
158 #endif // CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_ | 161 #endif // CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_ |
OLD | NEW |