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

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: Add pointer to the documentation of the GetNetworkInterface json format. 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
« no previous file with comments | « chromeos/dbus/debug_daemon_client.h ('k') | chromeos/dbus/mock_debug_daemon_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..8ae9c0ab3173aa14998e3360cc45bffce7175a70 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 GetNetworkInterfaces(
+ const GetNetworkInterfacesCallback& callback) OVERRIDE {
+ dbus::MethodCall method_call(debugd::kDebugdInterface,
+ debugd::kGetInterfaces);
+ debugdaemon_proxy_->CallMethod(
+ &method_call,
+ dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
+ base::Bind(&DebugDaemonClientImpl::OnGetNetworkInterfaces,
+ 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 OnGetNetworkInterfaces(const GetNetworkInterfacesCallback& 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,10 +500,14 @@ 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 GetNetworkInterfaces(
+ const GetNetworkInterfacesCallback& callback) OVERRIDE {
+ callback.Run(false, "");
+ }
virtual void GetAllLogs(const GetAllLogsCallback& callback) OVERRIDE {
std::map<std::string, std::string> empty;
callback.Run(false, empty);
« no previous file with comments | « chromeos/dbus/debug_daemon_client.h ('k') | chromeos/dbus/mock_debug_daemon_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698