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

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

Issue 23506040: Add ethernet to ONC validation and Shill translation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed networkingPrivate api test on non-chromeos. Created 7 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/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 "chromeos/network/onc/onc_constants.h" 10 #include "chromeos/network/onc/onc_constants.h"
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 }; 205 };
206 206
207 const NestedShillDictionaryEntry nested_shill_dictionaries[] = { 207 const NestedShillDictionaryEntry nested_shill_dictionaries[] = {
208 { &kCellularApnSignature, cellular_apn_property_path_entries }, 208 { &kCellularApnSignature, cellular_apn_property_path_entries },
209 { NULL } 209 { NULL }
210 }; 210 };
211 211
212 } // namespace 212 } // namespace
213 213
214 const StringTranslationEntry kNetworkTypeTable[] = { 214 const StringTranslationEntry kNetworkTypeTable[] = {
215 { network_type::kEthernet, flimflam::kTypeEthernet }, 215 // This mapping is ensured in the translation code.
216 // { network_type::kEthernet, flimflam::kTypeEthernet },
217 // { network_type::kEthernet, shill::kTypeEthernetEap },
216 { network_type::kWiFi, flimflam::kTypeWifi }, 218 { network_type::kWiFi, flimflam::kTypeWifi },
217 { network_type::kCellular, flimflam::kTypeCellular }, 219 { network_type::kCellular, flimflam::kTypeCellular },
218 { network_type::kVPN, flimflam::kTypeVPN }, 220 { network_type::kVPN, flimflam::kTypeVPN },
219 { NULL } 221 { NULL }
220 }; 222 };
221 223
222 const StringTranslationEntry kVPNTypeTable[] = { 224 const StringTranslationEntry kVPNTypeTable[] = {
223 { vpn::kTypeL2TP_IPsec, flimflam::kProviderL2tpIpsec }, 225 { vpn::kTypeL2TP_IPsec, flimflam::kProviderL2tpIpsec },
224 { vpn::kOpenVPN, flimflam::kProviderOpenVpn }, 226 { vpn::kOpenVPN, flimflam::kProviderOpenVpn },
225 { NULL } 227 { NULL }
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 continue; 321 continue;
320 *onc_value = table[i].onc_value; 322 *onc_value = table[i].onc_value;
321 return true; 323 return true;
322 } 324 }
323 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; 325 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC";
324 return false; 326 return false;
325 } 327 }
326 328
327 } // namespace onc 329 } // namespace onc
328 } // namespace chromeos 330 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/onc/onc_signature.cc ('k') | chromeos/network/onc/onc_translator_onc_to_shill.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698