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 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1057 case IPCONFIG_TYPE_PPP: | 1057 case IPCONFIG_TYPE_PPP: |
1058 type_str = flimflam::kTypePPP; | 1058 type_str = flimflam::kTypePPP; |
1059 break; | 1059 break; |
1060 default: | 1060 default: |
1061 return false; | 1061 return false; |
1062 }; | 1062 }; |
1063 const dbus::ObjectPath result = | 1063 const dbus::ObjectPath result = |
1064 DBusThreadManager::Get()->GetFlimflamDeviceClient()-> | 1064 DBusThreadManager::Get()->GetFlimflamDeviceClient()-> |
1065 CallAddIPConfigAndBlock(dbus::ObjectPath(device_path), type_str); | 1065 CallAddIPConfigAndBlock(dbus::ObjectPath(device_path), type_str); |
1066 if (result.value().empty()) { | 1066 if (result.value().empty()) { |
1067 LOG(WARNING) <<"Add IPConfig failed: "; | 1067 LOG(ERROR) << "Add IPConfig failed for device path " << device_path |
| 1068 << " and type " << type_str; |
1068 return false; | 1069 return false; |
1069 } | 1070 } |
1070 return true; | 1071 return true; |
1071 } | 1072 } |
1072 } | 1073 } |
1073 | 1074 |
1074 bool CrosRemoveIPConfig(const std::string& ipconfig_path) { | 1075 bool CrosRemoveIPConfig(const std::string& ipconfig_path) { |
1075 if (g_libcros_network_functions_enabled) { | 1076 if (g_libcros_network_functions_enabled) { |
1076 IPConfig dummy_config = {}; | 1077 IPConfig dummy_config = {}; |
1077 dummy_config.path = ipconfig_path.c_str(); | 1078 dummy_config.path = ipconfig_path.c_str(); |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1196 ScopedGHashTable ghash( | 1197 ScopedGHashTable ghash( |
1197 ConvertDictionaryValueToStringValueGHashTable(properties)); | 1198 ConvertDictionaryValueToStringValueGHashTable(properties)); |
1198 chromeos::ConfigureService("", ghash.get(), OnConfigureService, NULL); | 1199 chromeos::ConfigureService("", ghash.get(), OnConfigureService, NULL); |
1199 } else { | 1200 } else { |
1200 DBusThreadManager::Get()->GetFlimflamManagerClient()->ConfigureService( | 1201 DBusThreadManager::Get()->GetFlimflamManagerClient()->ConfigureService( |
1201 properties, base::Bind(&DoNothing)); | 1202 properties, base::Bind(&DoNothing)); |
1202 } | 1203 } |
1203 } | 1204 } |
1204 | 1205 |
1205 } // namespace chromeos | 1206 } // namespace chromeos |
OLD | NEW |