OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/fake_shill_manager_client.h" | 5 #include "chromeos/dbus/fake_shill_manager_client.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 const ErrorCallback& error_callback) { | 348 const ErrorCallback& error_callback) { |
349 if (best_service_.empty()) { | 349 if (best_service_.empty()) { |
350 VLOG(1) << "No 'best' service set."; | 350 VLOG(1) << "No 'best' service set."; |
351 return; | 351 return; |
352 } | 352 } |
353 | 353 |
354 DBusThreadManager::Get()->GetShillServiceClient()->Connect( | 354 DBusThreadManager::Get()->GetShillServiceClient()->Connect( |
355 dbus::ObjectPath(best_service_), callback, error_callback); | 355 dbus::ObjectPath(best_service_), callback, error_callback); |
356 } | 356 } |
357 | 357 |
358 void FakeShillManagerClient::AddWakeOnPacketConnection( | |
359 const net::IPEndPoint& ip_endpoint, | |
360 const base::Closure& callback, | |
361 const ErrorCallback& error_callback) { | |
362 } | |
363 | |
364 void FakeShillManagerClient::RemoveWakeOnPacketConnection( | |
365 const net::IPEndPoint& ip_endpoint, | |
366 const base::Closure& callback, | |
367 const ErrorCallback& error_callback) { | |
368 } | |
369 | |
370 void FakeShillManagerClient::RemoveAllWakeOnPacketConnections( | |
371 const base::Closure& callback, | |
372 const ErrorCallback& error_callback) { | |
373 } | |
374 | |
375 ShillManagerClient::TestInterface* FakeShillManagerClient::GetTestInterface() { | 358 ShillManagerClient::TestInterface* FakeShillManagerClient::GetTestInterface() { |
376 return this; | 359 return this; |
377 } | 360 } |
378 | 361 |
379 // ShillManagerClient::TestInterface overrides. | 362 // ShillManagerClient::TestInterface overrides. |
380 | 363 |
381 void FakeShillManagerClient::AddDevice(const std::string& device_path) { | 364 void FakeShillManagerClient::AddDevice(const std::string& device_path) { |
382 if (GetListProperty(shill::kDevicesProperty) | 365 if (GetListProperty(shill::kDevicesProperty) |
383 ->AppendIfNotPresent(new base::StringValue(device_path))) { | 366 ->AppendIfNotPresent(new base::StringValue(device_path))) { |
384 CallNotifyObserversPropertyChanged(shill::kDevicesProperty); | 367 CallNotifyObserversPropertyChanged(shill::kDevicesProperty); |
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1106 *enabled = true; | 1089 *enabled = true; |
1107 if ((state == shill::kStatePortal && type != shill::kTypeWifi) || | 1090 if ((state == shill::kStatePortal && type != shill::kTypeWifi) || |
1108 (state == kNetworkActivated && type != shill::kTypeCellular)) { | 1091 (state == kNetworkActivated && type != shill::kTypeCellular)) { |
1109 LOG(WARNING) << "Invalid state: " << state << " for " << type; | 1092 LOG(WARNING) << "Invalid state: " << state << " for " << type; |
1110 return shill::kStateIdle; | 1093 return shill::kStateIdle; |
1111 } | 1094 } |
1112 return state; | 1095 return state; |
1113 } | 1096 } |
1114 | 1097 |
1115 } // namespace chromeos | 1098 } // namespace chromeos |
OLD | NEW |