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_service_client.h" | 5 #include "chromeos/dbus/fake_shill_service_client.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 std::string device_path = DBusThreadManager::Get() | 383 std::string device_path = DBusThreadManager::Get() |
384 ->GetShillDeviceClient() | 384 ->GetShillDeviceClient() |
385 ->GetTestInterface() | 385 ->GetTestInterface() |
386 ->GetDevicePathForType(type); | 386 ->GetDevicePathForType(type); |
387 properties->SetStringWithoutPathExpansion(shill::kDeviceProperty, | 387 properties->SetStringWithoutPathExpansion(shill::kDeviceProperty, |
388 device_path); | 388 device_path); |
389 properties->SetStringWithoutPathExpansion(shill::kTypeProperty, type); | 389 properties->SetStringWithoutPathExpansion(shill::kTypeProperty, type); |
390 properties->SetStringWithoutPathExpansion(shill::kStateProperty, state); | 390 properties->SetStringWithoutPathExpansion(shill::kStateProperty, state); |
391 properties->SetBooleanWithoutPathExpansion(shill::kVisibleProperty, visible); | 391 properties->SetBooleanWithoutPathExpansion(shill::kVisibleProperty, visible); |
392 if (type == shill::kTypeWifi) { | 392 if (type == shill::kTypeWifi) { |
393 properties->SetStringWithoutPathExpansion(shill::kSecurityProperty, | 393 properties->SetStringWithoutPathExpansion(shill::kSecurityClassProperty, |
394 shill::kSecurityNone); | 394 shill::kSecurityNone); |
395 properties->SetStringWithoutPathExpansion(shill::kModeProperty, | 395 properties->SetStringWithoutPathExpansion(shill::kModeProperty, |
396 shill::kModeManaged); | 396 shill::kModeManaged); |
397 } | 397 } |
398 return properties; | 398 return properties; |
399 } | 399 } |
400 | 400 |
401 void FakeShillServiceClient::RemoveService(const std::string& service_path) { | 401 void FakeShillServiceClient::RemoveService(const std::string& service_path) { |
402 stub_services_.RemoveWithoutPathExpansion(service_path, NULL); | 402 stub_services_.RemoveWithoutPathExpansion(service_path, NULL); |
403 connect_behavior_.erase(service_path); | 403 connect_behavior_.erase(service_path); |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
628 } else { | 628 } else { |
629 // Set Online. | 629 // Set Online. |
630 VLOG(1) << "Setting state to Online " << service_path; | 630 VLOG(1) << "Setting state to Online " << service_path; |
631 SetServiceProperty(service_path, | 631 SetServiceProperty(service_path, |
632 shill::kStateProperty, | 632 shill::kStateProperty, |
633 base::StringValue(shill::kStateOnline)); | 633 base::StringValue(shill::kStateOnline)); |
634 } | 634 } |
635 } | 635 } |
636 | 636 |
637 } // namespace chromeos | 637 } // namespace chromeos |
OLD | NEW |