Chromium Code Reviews| 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/memory/ref_counted_memory.h" | 9 #include "base/memory/ref_counted_memory.h" |
| 10 #include "chromeos/chromeos_export.h" | 10 #include "chromeos/chromeos_export.h" |
| 11 #include "chromeos/dbus/dbus_client_implementation_type.h" | 11 #include "chromeos/dbus/dbus_client_implementation_type.h" |
| 12 | 12 |
| 13 namespace dbus { | 13 namespace dbus { |
| 14 class Bus; | 14 class Bus; |
| 15 } // namespace dbus | 15 } // namespace dbus |
| 16 | 16 |
| 17 namespace chromeos { | 17 namespace chromeos { |
| 18 | 18 |
| 19 // DebugDaemonClient is used to communicate with the debug daemon. | 19 // DebugDaemonClient is used to communicate with the debug daemon. |
| 20 class CHROMEOS_EXPORT DebugDaemonClient { | 20 class CHROMEOS_EXPORT DebugDaemonClient { |
| 21 public: | 21 public: |
| 22 virtual ~DebugDaemonClient(); | 22 virtual ~DebugDaemonClient(); |
| 23 | 23 |
| 24 // Called once SetDebugMode() is complete. Takes one parameter: | |
| 25 // - succeeded: debug mode was changed successfully. | |
| 26 typedef base::Callback<void(bool succeeded)> SetDebugModeCallback; | |
| 27 | |
| 28 // Requests to change debug mode to given |subsystem| and calls | |
| 29 // |callback| when completed. |subsystem| should be one of the | |
| 30 // following: "wifi", "ethernet", "cellular" or "none". | |
|
satorux1
2012/04/12 17:34:56
thank you for adding!
| |
| 31 virtual void SetDebugMode(const std::string& subsystem, | |
| 32 const SetDebugModeCallback& callback) = 0; | |
| 33 | |
| 24 // Requests to start system/kernel tracing. | 34 // Requests to start system/kernel tracing. |
| 25 virtual void StartSystemTracing() = 0; | 35 virtual void StartSystemTracing() = 0; |
| 26 | 36 |
| 27 // Called once RequestStopSystemTracing() is complete. Takes one parameter: | 37 // Called once RequestStopSystemTracing() is complete. Takes one parameter: |
| 28 // - result: the data collected while tracing was active | 38 // - result: the data collected while tracing was active |
| 29 typedef base::Callback<void(const scoped_refptr<base::RefCountedString>& | 39 typedef base::Callback<void(const scoped_refptr<base::RefCountedString>& |
| 30 result)> StopSystemTracingCallback; | 40 result)> StopSystemTracingCallback; |
| 31 | 41 |
| 32 // Requests to stop system tracing and calls |callback| when completed. | 42 // Requests to stop system tracing and calls |callback| when completed. |
| 33 virtual bool RequestStopSystemTracing(const StopSystemTracingCallback& | 43 virtual bool RequestStopSystemTracing(const StopSystemTracingCallback& |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 44 // Create() should be used instead. | 54 // Create() should be used instead. |
| 45 DebugDaemonClient(); | 55 DebugDaemonClient(); |
| 46 | 56 |
| 47 private: | 57 private: |
| 48 DISALLOW_COPY_AND_ASSIGN(DebugDaemonClient); | 58 DISALLOW_COPY_AND_ASSIGN(DebugDaemonClient); |
| 49 }; | 59 }; |
| 50 | 60 |
| 51 } // namespace chromeos | 61 } // namespace chromeos |
| 52 | 62 |
| 53 #endif // CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_ | 63 #endif // CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_ |
| OLD | NEW |