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

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

Issue 492383002: Use ONC for Cellular APN and SimLock in Settings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests Created 6 years, 3 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 | Annotate | Revision Log
OLDNEW
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/network_state.h" 5 #include "chromeos/network/network_state.h"
6 6
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "chromeos/network/network_event_log.h" 8 #include "chromeos/network/network_event_log.h"
9 #include "chromeos/network/network_profile_handler.h" 9 #include "chromeos/network/network_profile_handler.h"
10 #include "chromeos/network/network_type_pattern.h" 10 #include "chromeos/network/network_type_pattern.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 last_error_ = error_; 92 last_error_ = error_;
93 else 93 else
94 error_.clear(); 94 error_.clear();
95 return true; 95 return true;
96 } else if (key == shill::kActivationTypeProperty) { 96 } else if (key == shill::kActivationTypeProperty) {
97 return GetStringValue(key, value, &activation_type_); 97 return GetStringValue(key, value, &activation_type_);
98 } else if (key == shill::kActivationStateProperty) { 98 } else if (key == shill::kActivationStateProperty) {
99 return GetStringValue(key, value, &activation_state_); 99 return GetStringValue(key, value, &activation_state_);
100 } else if (key == shill::kRoamingStateProperty) { 100 } else if (key == shill::kRoamingStateProperty) {
101 return GetStringValue(key, value, &roaming_); 101 return GetStringValue(key, value, &roaming_);
102 } else if (key == shill::kPaymentPortalProperty) {
103 const base::DictionaryValue* olp;
104 if (!value.GetAsDictionary(&olp))
105 return false;
106 return olp->GetStringWithoutPathExpansion(shill::kPaymentPortalURL,
107 &payment_url_);
102 } else if (key == shill::kSecurityProperty) { 108 } else if (key == shill::kSecurityProperty) {
103 return GetStringValue(key, value, &security_); 109 return GetStringValue(key, value, &security_);
104 } else if (key == shill::kEapMethodProperty) { 110 } else if (key == shill::kEapMethodProperty) {
105 return GetStringValue(key, value, &eap_method_); 111 return GetStringValue(key, value, &eap_method_);
106 } else if (key == shill::kNetworkTechnologyProperty) { 112 } else if (key == shill::kNetworkTechnologyProperty) {
107 return GetStringValue(key, value, &network_technology_); 113 return GetStringValue(key, value, &network_technology_);
108 } else if (key == shill::kDeviceProperty) { 114 } else if (key == shill::kDeviceProperty) {
109 return GetStringValue(key, value, &device_path_); 115 return GetStringValue(key, value, &device_path_);
110 } else if (key == shill::kGuidProperty) { 116 } else if (key == shill::kGuidProperty) {
111 return GetStringValue(key, value, &guid_); 117 return GetStringValue(key, value, &guid_);
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 connection_state == shill::kStateCarrier); 343 connection_state == shill::kStateCarrier);
338 } 344 }
339 345
340 // static 346 // static
341 bool NetworkState::ErrorIsValid(const std::string& error) { 347 bool NetworkState::ErrorIsValid(const std::string& error) {
342 // Shill uses "Unknown" to indicate an unset or cleared error state. 348 // Shill uses "Unknown" to indicate an unset or cleared error state.
343 return !error.empty() && error != kErrorUnknown; 349 return !error.empty() && error != kErrorUnknown;
344 } 350 }
345 351
346 } // namespace chromeos 352 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698