OLD | NEW |
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/network/cros_network_functions.h" | 5 #include "chromeos/network/cros_network_functions.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/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
659 void CrosSetCarrier(const std::string& device_path, | 659 void CrosSetCarrier(const std::string& device_path, |
660 const std::string& carrier, | 660 const std::string& carrier, |
661 const NetworkOperationCallback& callback) { | 661 const NetworkOperationCallback& callback) { |
662 DBusThreadManager::Get()->GetShillDeviceClient()->SetCarrier( | 662 DBusThreadManager::Get()->GetShillDeviceClient()->SetCarrier( |
663 dbus::ObjectPath(device_path), carrier, | 663 dbus::ObjectPath(device_path), carrier, |
664 base::Bind(callback, device_path, NETWORK_METHOD_ERROR_NONE, | 664 base::Bind(callback, device_path, NETWORK_METHOD_ERROR_NONE, |
665 std::string()), | 665 std::string()), |
666 base::Bind(&OnNetworkActionError, callback, device_path)); | 666 base::Bind(&OnNetworkActionError, callback, device_path)); |
667 } | 667 } |
668 | 668 |
| 669 // Resets the device. |
| 670 void CrosReset(const std::string& device_path) { |
| 671 DBusThreadManager::Get()->GetShillDeviceClient()->Reset( |
| 672 dbus::ObjectPath(device_path), |
| 673 base::Bind(&DoNothing), |
| 674 base::Bind(&IgnoreErrors)); |
| 675 } |
| 676 |
669 } // namespace chromeos | 677 } // namespace chromeos |
OLD | NEW |