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

Side by Side Diff: chromeos/dbus/shill_device_client.cc

Issue 1565303002: Change IPEndpoint::address() to return a net::IPAddress (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Android Created 4 years, 11 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 unified diff | Download patch
OLDNEW
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 #include "chromeos/dbus/shill_device_client.h" 5 #include "chromeos/dbus/shill_device_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 writer.AppendString(peer); 204 writer.AppendString(peer);
205 GetHelper(device_path)->CallStringMethodWithErrorCallback( 205 GetHelper(device_path)->CallStringMethodWithErrorCallback(
206 &method_call, callback, error_callback); 206 &method_call, callback, error_callback);
207 } 207 }
208 208
209 void AddWakeOnPacketConnection( 209 void AddWakeOnPacketConnection(
210 const dbus::ObjectPath& device_path, 210 const dbus::ObjectPath& device_path,
211 const net::IPEndPoint& ip_endpoint, 211 const net::IPEndPoint& ip_endpoint,
212 const base::Closure& callback, 212 const base::Closure& callback,
213 const ErrorCallback& error_callback) override { 213 const ErrorCallback& error_callback) override {
214 if (ip_endpoint.address().empty()) { 214 if (ip_endpoint.address_number().empty()) {
215 LOG(ERROR) << "AddWakeOnPacketConnection: null address"; 215 LOG(ERROR) << "AddWakeOnPacketConnection: null address";
216 return; 216 return;
217 } 217 }
218 dbus::MethodCall method_call(shill::kFlimflamDeviceInterface, 218 dbus::MethodCall method_call(shill::kFlimflamDeviceInterface,
219 shill::kAddWakeOnPacketConnectionFunction); 219 shill::kAddWakeOnPacketConnectionFunction);
220 dbus::MessageWriter writer(&method_call); 220 dbus::MessageWriter writer(&method_call);
221 writer.AppendString(ip_endpoint.ToStringWithoutPort()); 221 writer.AppendString(ip_endpoint.ToStringWithoutPort());
222 GetHelper(device_path)->CallVoidMethodWithErrorCallback(&method_call, 222 GetHelper(device_path)->CallVoidMethodWithErrorCallback(&method_call,
223 callback, 223 callback,
224 error_callback); 224 error_callback);
225 } 225 }
226 226
227 void RemoveWakeOnPacketConnection( 227 void RemoveWakeOnPacketConnection(
228 const dbus::ObjectPath& device_path, 228 const dbus::ObjectPath& device_path,
229 const net::IPEndPoint& ip_endpoint, 229 const net::IPEndPoint& ip_endpoint,
230 const base::Closure& callback, 230 const base::Closure& callback,
231 const ErrorCallback& error_callback) override { 231 const ErrorCallback& error_callback) override {
232 if (ip_endpoint.address().empty()) { 232 if (ip_endpoint.address_number().empty()) {
233 LOG(ERROR) << "RemoveWakeOnPacketConnection: null address"; 233 LOG(ERROR) << "RemoveWakeOnPacketConnection: null address";
234 return; 234 return;
235 } 235 }
236 dbus::MethodCall method_call(shill::kFlimflamDeviceInterface, 236 dbus::MethodCall method_call(shill::kFlimflamDeviceInterface,
237 shill::kRemoveWakeOnPacketConnectionFunction); 237 shill::kRemoveWakeOnPacketConnectionFunction);
238 dbus::MessageWriter writer(&method_call); 238 dbus::MessageWriter writer(&method_call);
239 writer.AppendString(ip_endpoint.ToStringWithoutPort()); 239 writer.AppendString(ip_endpoint.ToStringWithoutPort());
240 GetHelper(device_path)->CallVoidMethodWithErrorCallback(&method_call, 240 GetHelper(device_path)->CallVoidMethodWithErrorCallback(&method_call,
241 callback, 241 callback,
242 error_callback); 242 error_callback);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 ShillDeviceClient::ShillDeviceClient() {} 291 ShillDeviceClient::ShillDeviceClient() {}
292 292
293 ShillDeviceClient::~ShillDeviceClient() {} 293 ShillDeviceClient::~ShillDeviceClient() {}
294 294
295 // static 295 // static
296 ShillDeviceClient* ShillDeviceClient::Create() { 296 ShillDeviceClient* ShillDeviceClient::Create() {
297 return new ShillDeviceClientImpl(); 297 return new ShillDeviceClientImpl();
298 } 298 }
299 299
300 } // namespace chromeos 300 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698