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 "chrome/browser/chromeos/cros/cros_network_functions.h" | 5 #include "chrome/browser/chromeos/cros/cros_network_functions.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 return false; | 673 return false; |
674 } | 674 } |
675 return true; | 675 return true; |
676 } | 676 } |
677 | 677 |
678 bool CrosRemoveIPConfig(const std::string& ipconfig_path) { | 678 bool CrosRemoveIPConfig(const std::string& ipconfig_path) { |
679 return DBusThreadManager::Get()->GetFlimflamIPConfigClient()-> | 679 return DBusThreadManager::Get()->GetFlimflamIPConfigClient()-> |
680 CallRemoveAndBlock(dbus::ObjectPath(ipconfig_path)); | 680 CallRemoveAndBlock(dbus::ObjectPath(ipconfig_path)); |
681 } | 681 } |
682 | 682 |
| 683 void CrosRequestIPConfigRefresh(const std::string& ipconfig_path) { |
| 684 DBusThreadManager::Get()->GetFlimflamIPConfigClient()->Refresh( |
| 685 dbus::ObjectPath(ipconfig_path), |
| 686 base::Bind(&DoNothing)); |
| 687 } |
| 688 |
683 bool CrosGetWifiAccessPoints(WifiAccessPointVector* result) { | 689 bool CrosGetWifiAccessPoints(WifiAccessPointVector* result) { |
684 scoped_ptr<base::DictionaryValue> manager_properties( | 690 scoped_ptr<base::DictionaryValue> manager_properties( |
685 DBusThreadManager::Get()->GetFlimflamManagerClient()-> | 691 DBusThreadManager::Get()->GetFlimflamManagerClient()-> |
686 CallGetPropertiesAndBlock()); | 692 CallGetPropertiesAndBlock()); |
687 if (!manager_properties.get()) { | 693 if (!manager_properties.get()) { |
688 LOG(WARNING) << "Couldn't read managers's properties"; | 694 LOG(WARNING) << "Couldn't read managers's properties"; |
689 return false; | 695 return false; |
690 } | 696 } |
691 | 697 |
692 base::ListValue* devices = NULL; | 698 base::ListValue* devices = NULL; |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
765 return false; // No powered device found that has a 'Networks' array. | 771 return false; // No powered device found that has a 'Networks' array. |
766 return true; | 772 return true; |
767 } | 773 } |
768 | 774 |
769 void CrosConfigureService(const base::DictionaryValue& properties) { | 775 void CrosConfigureService(const base::DictionaryValue& properties) { |
770 DBusThreadManager::Get()->GetFlimflamManagerClient()->ConfigureService( | 776 DBusThreadManager::Get()->GetFlimflamManagerClient()->ConfigureService( |
771 properties, base::Bind(&DoNothing)); | 777 properties, base::Bind(&DoNothing)); |
772 } | 778 } |
773 | 779 |
774 } // namespace chromeos | 780 } // namespace chromeos |
OLD | NEW |