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

Unified Diff: chromeos/dbus/debug_daemon_client.cc

Issue 10831059: debugd: Add GetNetworkInterfaces functionality. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chromeos/dbus/debug_daemon_client.cc
diff --git a/chromeos/dbus/debug_daemon_client.cc b/chromeos/dbus/debug_daemon_client.cc
index 2bcd57ff8458b3efb87c16f8ad618846158c7826..17469ba9e3dae6a3c6e0039122e0706a17a6a079 100644
--- a/chromeos/dbus/debug_daemon_client.cc
+++ b/chromeos/dbus/debug_daemon_client.cc
@@ -231,6 +231,18 @@ class DebugDaemonClientImpl : public DebugDaemonClient {
callback));
}
+ virtual void GetInterfaces(const GetInterfacesCallback& callback)
+ OVERRIDE {
+ dbus::MethodCall method_call(debugd::kDebugdInterface,
+ debugd::kGetInterfaces);
+ debugdaemon_proxy_->CallMethod(
+ &method_call,
+ dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
+ base::Bind(&DebugDaemonClientImpl::OnGetInterfaces,
+ weak_ptr_factory_.GetWeakPtr(),
+ callback));
+ }
+
virtual void GetAllLogs(const GetAllLogsCallback& callback)
OVERRIDE {
dbus::MethodCall method_call(debugd::kDebugdInterface,
@@ -374,6 +386,15 @@ class DebugDaemonClientImpl : public DebugDaemonClient {
callback.Run(false, "");
}
+ void OnGetInterfaces(const GetInterfacesCallback& callback,
+ dbus::Response* response) {
+ std::string status;
+ if (response && dbus::MessageReader(response).PopString(&status))
+ callback.Run(true, status);
+ else
+ callback.Run(false, "");
+ }
+
void OnGetAllLogs(const GetAllLogsCallback& callback,
dbus::Response* response) {
std::map<std::string, std::string> logs;
@@ -479,7 +500,11 @@ class DebugDaemonClientStubImpl : public DebugDaemonClient {
OVERRIDE {
callback.Run(false, "");
}
- virtual void GetModemStatus(const GetNetworkStatusCallback& callback)
+ virtual void GetModemStatus(const GetModemStatusCallback& callback)
+ OVERRIDE {
+ callback.Run(false, "");
+ }
+ virtual void GetInterfaces(const GetInterfacesCallback& callback)
OVERRIDE {
callback.Run(false, "");
}

Powered by Google App Engine
This is Rietveld 408576698