Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: chromeos/network/shill_property_util.cc

Issue 700383008: Use setProperties for Cellular APN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_430113_internet_options_2
Patch Set: Allow Cellular in shill_property_util::CopyIdentifyingProperties to fix unit test Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chromeos/dbus/fake_shill_manager_client.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chromeos/dbus/fake_shill_manager_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698