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

Side by Side Diff: chromeos/network/onc/onc_translation_tables.cc

Issue 1085993002: Revert of Use networkingPrivate.startConnect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_430115_internet_options_cellular
Patch Set: Created 5 years, 8 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/network/network_util.cc ('k') | chromeos/network/onc/onc_translator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/onc/onc_translation_tables.h" 5 #include "chromeos/network/onc/onc_translation_tables.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "components/onc/onc_constants.h" 10 #include "components/onc/onc_constants.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 // This field is converted during translation, see onc_translator_*. 180 // This field is converted during translation, see onc_translator_*.
181 // { ::onc::cellular::kPaymentPortal, shill::kPaymentPortal}, 181 // { ::onc::cellular::kPaymentPortal, shill::kPaymentPortal},
182 // This field is converted during translation, see onc_translator_*. 182 // This field is converted during translation, see onc_translator_*.
183 // { ::onc::cellular::kRoamingState, shill::kRoamingStateProperty}, 183 // { ::onc::cellular::kRoamingState, shill::kRoamingStateProperty},
184 {::onc::cellular::kSignalStrength, shill::kSignalStrengthProperty}, 184 {::onc::cellular::kSignalStrength, shill::kSignalStrengthProperty},
185 {NULL}}; 185 {NULL}};
186 186
187 const FieldTranslationEntry network_fields[] = { 187 const FieldTranslationEntry network_fields[] = {
188 {::onc::network_config::kGUID, shill::kGuidProperty}, 188 {::onc::network_config::kGUID, shill::kGuidProperty},
189 {::onc::network_config::kConnectable, shill::kConnectableProperty}, 189 {::onc::network_config::kConnectable, shill::kConnectableProperty},
190 {::onc::network_config::kErrorState, shill::kErrorProperty},
190 {::onc::network_config::kPriority, shill::kPriorityProperty}, 191 {::onc::network_config::kPriority, shill::kPriorityProperty},
191 192
192 // Shill doesn't allow setting the name for non-VPN networks. 193 // Shill doesn't allow setting the name for non-VPN networks.
193 // Name is conditionally translated, see onc_translator_*. 194 // Name is conditionally translated, see onc_translator_*.
194 // {::onc::network_config::kName, shill::kNameProperty }, 195 // { ::onc::network_config::kName, shill::kNameProperty },
195 196
196 // Type is converted during translation, see onc_translator_*. 197 // Type is converted during translation, see onc_translator_*.
197 // {::onc::network_config::kType, shill::kTypeProperty }, 198 // { ::onc::network_config::kType, shill::kTypeProperty },
198 199
199 // These fields are converted during translation, see 200 // These fields are converted during translation, see
200 // onc_translator_shill_to_onc.cc. They are only converted when going from 201 // onc_translator_shill_to_onc.cc. They are only converted when going from
201 // Shill->ONC, and ignored otherwise. 202 // Shill->ONC, and ignored otherwise.
202 // {::onc::network_config::kConnectionState, shill::kStateProperty }, 203 // { ::onc::network_config::kConnectionState, shill::kStateProperty },
203 // {::onc::network_config::kErrorState, shill::kErrorProperty}, 204 // { ::onc::network_config::kRestrictedConnectivity,
204 // {::onc::network_config::kRestrictedConnectivity, shill::kStateProperty }, 205 // shill::kStateProperty },
205 // {::onc::network_config::kSource, shill::kProfileProperty }, 206 // { ::onc::network_config::kSource, shill::kProfileProperty },
206 // {::onc::network_config::kMacAddress, shill::kAddressProperty }, 207 // { ::onc::network_config::kMacAddress, shill::kAddressProperty },
207 {NULL}}; 208 {NULL}};
208 209
209 const FieldTranslationEntry ipconfig_fields[] = { 210 const FieldTranslationEntry ipconfig_fields[] = {
210 {::onc::ipconfig::kIPAddress, shill::kAddressProperty}, 211 {::onc::ipconfig::kIPAddress, shill::kAddressProperty},
211 {::onc::ipconfig::kGateway, shill::kGatewayProperty}, 212 {::onc::ipconfig::kGateway, shill::kGatewayProperty},
212 {::onc::ipconfig::kRoutingPrefix, shill::kPrefixlenProperty}, 213 {::onc::ipconfig::kRoutingPrefix, shill::kPrefixlenProperty},
213 {::onc::ipconfig::kNameServers, shill::kNameServersProperty}, 214 {::onc::ipconfig::kNameServers, shill::kNameServersProperty},
214 // This field is converted during translation, see ShillToONCTranslator:: 215 // This field is converted during translation, see ShillToONCTranslator::
215 // TranslateIPConfig. It is only converted from Shill->ONC. 216 // TranslateIPConfig. It is only converted from Shill->ONC.
216 // { ::onc::ipconfig::kType, shill::kMethodProperty}, 217 // { ::onc::ipconfig::kType, shill::kMethodProperty},
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 continue; 436 continue;
436 *onc_value = table[i].onc_value; 437 *onc_value = table[i].onc_value;
437 return true; 438 return true;
438 } 439 }
439 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; 440 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC";
440 return false; 441 return false;
441 } 442 }
442 443
443 } // namespace onc 444 } // namespace onc
444 } // namespace chromeos 445 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/network_util.cc ('k') | chromeos/network/onc/onc_translator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698