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/network/shill_property_util.h" | 5 #include "chromeos/network/shill_property_util.h" |
6 | 6 |
7 #include "base/i18n/icu_encoding_detection.h" | 7 #include "base/i18n/icu_encoding_detection.h" |
8 #include "base/i18n/icu_string_conversions.h" | 8 #include "base/i18n/icu_string_conversions.h" |
9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 success &= !type.empty(); | 240 success &= !type.empty(); |
241 dest->SetStringWithoutPathExpansion(shill::kTypeProperty, type); | 241 dest->SetStringWithoutPathExpansion(shill::kTypeProperty, type); |
242 if (type == shill::kTypeWifi) { | 242 if (type == shill::kTypeWifi) { |
243 success &= | 243 success &= |
244 CopyStringFromDictionary( | 244 CopyStringFromDictionary( |
245 service_properties, shill::kSecurityClassProperty, dest); | 245 service_properties, shill::kSecurityClassProperty, dest); |
246 success &= | 246 success &= |
247 CopyStringFromDictionary(service_properties, shill::kWifiHexSsid, dest); | 247 CopyStringFromDictionary(service_properties, shill::kWifiHexSsid, dest); |
248 success &= CopyStringFromDictionary( | 248 success &= CopyStringFromDictionary( |
249 service_properties, shill::kModeProperty, dest); | 249 service_properties, shill::kModeProperty, dest); |
| 250 } else if (type == shill::kTypeCellular) { |
| 251 success &= CopyStringFromDictionary( |
| 252 service_properties, shill::kNetworkTechnologyProperty, dest); |
250 } else if (type == shill::kTypeVPN) { | 253 } else if (type == shill::kTypeVPN) { |
251 success &= CopyStringFromDictionary( | 254 success &= CopyStringFromDictionary( |
252 service_properties, shill::kNameProperty, dest); | 255 service_properties, shill::kNameProperty, dest); |
253 | 256 |
254 // VPN Provider values are read from the "Provider" dictionary, but written | 257 // VPN Provider values are read from the "Provider" dictionary, but written |
255 // with the keys "Provider.Type" and "Provider.Host". | 258 // with the keys "Provider.Type" and "Provider.Host". |
256 // TODO(pneubeck): Simplify this once http://crbug.com/381135 is fixed. | 259 // TODO(pneubeck): Simplify this once http://crbug.com/381135 is fixed. |
257 std::string vpn_provider_type; | 260 std::string vpn_provider_type; |
258 std::string vpn_provider_host; | 261 std::string vpn_provider_host; |
259 if (properties_read_from_shill) { | 262 if (properties_read_from_shill) { |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 LOG(WARNING) | 353 LOG(WARNING) |
351 << "Provider name and country not defined, using code instead: " | 354 << "Provider name and country not defined, using code instead: " |
352 << *home_provider_id; | 355 << *home_provider_id; |
353 } | 356 } |
354 return true; | 357 return true; |
355 } | 358 } |
356 | 359 |
357 } // namespace shill_property_util | 360 } // namespace shill_property_util |
358 | 361 |
359 } // namespace chromeos | 362 } // namespace chromeos |
OLD | NEW |