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

Unified Diff: chromeos/dbus/shill_device_client.cc

Issue 722043004: Clean up wake on wifi handling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 6 years, 1 month 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/shill_device_client.h ('k') | chromeos/dbus/shill_manager_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/shill_device_client.cc
diff --git a/chromeos/dbus/shill_device_client.cc b/chromeos/dbus/shill_device_client.cc
index 1a523ffd3342167b0d6abd70336a9ebdeaf7120e..5685b60960dbe79fb11d7b660a10ac1a37276fff 100644
--- a/chromeos/dbus/shill_device_client.cc
+++ b/chromeos/dbus/shill_device_client.cc
@@ -14,6 +14,7 @@
#include "dbus/object_path.h"
#include "dbus/object_proxy.h"
#include "dbus/values_util.h"
+#include "net/base/ip_endpoint.h"
#include "third_party/cros_system_api/dbus/service_constants.h"
namespace chromeos {
@@ -23,7 +24,7 @@ namespace {
// The ShillDeviceClient implementation.
class ShillDeviceClientImpl : public ShillDeviceClient {
public:
- explicit ShillDeviceClientImpl()
+ ShillDeviceClientImpl()
: bus_(NULL) {
}
@@ -206,6 +207,54 @@ class ShillDeviceClientImpl : public ShillDeviceClient {
&method_call, callback, error_callback);
}
+ void AddWakeOnPacketConnection(
+ const dbus::ObjectPath& device_path,
+ const net::IPEndPoint& ip_endpoint,
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) override {
+ if (ip_endpoint.address().empty()) {
+ LOG(ERROR) << "AddWakeOnPacketConnection: null address";
+ return;
+ }
+ dbus::MethodCall method_call(shill::kFlimflamDeviceInterface,
+ shill::kAddWakeOnPacketConnectionFunction);
+ dbus::MessageWriter writer(&method_call);
+ writer.AppendString(ip_endpoint.ToStringWithoutPort());
+ GetHelper(device_path)->CallVoidMethodWithErrorCallback(&method_call,
+ callback,
+ error_callback);
+ }
+
+ void RemoveWakeOnPacketConnection(
+ const dbus::ObjectPath& device_path,
+ const net::IPEndPoint& ip_endpoint,
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) override {
+ if (ip_endpoint.address().empty()) {
+ LOG(ERROR) << "RemoveWakeOnPacketConnection: null address";
+ return;
+ }
+ dbus::MethodCall method_call(shill::kFlimflamDeviceInterface,
+ shill::kRemoveWakeOnPacketConnectionFunction);
+ dbus::MessageWriter writer(&method_call);
+ writer.AppendString(ip_endpoint.ToStringWithoutPort());
+ GetHelper(device_path)->CallVoidMethodWithErrorCallback(&method_call,
+ callback,
+ error_callback);
+ }
+
+ void RemoveAllWakeOnPacketConnections(
+ const dbus::ObjectPath& device_path,
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) override {
+ dbus::MethodCall method_call(
+ shill::kFlimflamDeviceInterface,
+ shill::kRemoveAllWakeOnPacketConnectionsFunction);
+ GetHelper(device_path)->CallVoidMethodWithErrorCallback(&method_call,
+ callback,
+ error_callback);
+ }
+
virtual TestInterface* GetTestInterface() override {
return NULL;
}
« no previous file with comments | « chromeos/dbus/shill_device_client.h ('k') | chromeos/dbus/shill_manager_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698